1
- import socket
2
- from pathlib import Path
3
- from tempfile import TemporaryDirectory
4
-
5
- import anyio
6
- from pexpect .fdpexpect import fdspawn
7
-
8
1
from jumpstarter .common .utils import serve
9
2
from jumpstarter .drivers .dutlink .base import Dutlink
10
3
@@ -16,28 +9,23 @@ def test_drivers_dutlink():
16
9
storage_device = "/dev/null" ,
17
10
)
18
11
) as client :
19
- with TemporaryDirectory () as tempdir :
20
- socketpath = Path (tempdir ) / "socket"
21
-
22
- listener = client .portal .call (anyio .create_unix_listener , socketpath )
23
-
24
- with client .console .expect () as expect :
25
- expect .send ("\x02 " * 5 )
12
+ with client .console .expect () as expect :
13
+ expect .send ("\x02 " * 5 )
26
14
27
- expect .send ("about\r \n " )
28
- expect .expect ("Jumpstarter test-harness" )
15
+ expect .send ("about\r \n " )
16
+ expect .expect ("Jumpstarter test-harness" )
29
17
30
- expect .send ("console\r \n " )
31
- expect .expect ("Entering console mode" )
18
+ expect .send ("console\r \n " )
19
+ expect .expect ("Entering console mode" )
32
20
33
- client .power .off ()
21
+ client .power .off ()
34
22
35
- client .storage .write ("/dev/null" )
36
- client .storage .dut ()
23
+ client .storage .write ("/dev/null" )
24
+ client .storage .dut ()
37
25
38
- client .power .on ()
26
+ client .power .on ()
39
27
40
- expect .send ("\x02 " * 5 )
41
- expect .expect ("Exiting console mode" )
28
+ expect .send ("\x02 " * 5 )
29
+ expect .expect ("Exiting console mode" )
42
30
43
- client .power .off ()
31
+ client .power .off ()
0 commit comments