File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/tools/remote-test-client/tests Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -8,3 +8,18 @@ fn test_help() {
88 let stdout = String :: from_utf8 ( output. stdout . clone ( ) ) . unwrap ( ) ;
99 assert ! ( stdout. trim( ) . starts_with( "Usage:" ) ) ;
1010}
11+
12+ #[ test]
13+ fn test_timeout ( ) {
14+ let mut cmd = assert_cmd:: cargo:: cargo_bin_cmd!( ) ;
15+ cmd. env ( "TEST_DEVICE_CONNECT_TIMEOUT_SECONDS" , "1" ) ;
16+ cmd. env ( "TEST_DEVICE_ADDR" , "0.0.0.0:6969" ) ;
17+ cmd. args ( [ "spawn-emulator" , "riscv64-unknown-linux-gnu" , "./" ] ) ;
18+ cmd. arg ( std:: env:: temp_dir ( ) ) ;
19+
20+ let assert = cmd. assert ( ) . failure ( ) ;
21+ let output = assert. get_output ( ) ;
22+
23+ let stderr = String :: from_utf8 ( output. stderr . clone ( ) ) . unwrap ( ) ;
24+ assert ! ( stderr. contains( "Gave up trying to connect to test device" ) ) ;
25+ }
You can’t perform that action at this time.
0 commit comments