Skip to content

Commit 370ab01

Browse files
committed
runtest: Check two exit statuses from adb
Signed-off-by: Ian Jackson <[email protected]>
1 parent 73365b2 commit 370ab01

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,17 +869,23 @@ impl<'test> TestCx<'test> {
869869

870870
let adb_path = &self.config.adb_path;
871871

872-
Command::new(adb_path)
872+
let status = Command::new(adb_path)
873873
.arg("push")
874874
.arg(&exe_file)
875875
.arg(&self.config.adb_test_dir)
876876
.status()
877877
.unwrap_or_else(|_| panic!("failed to exec `{:?}`", adb_path));
878+
if !status.success() {
879+
panic!("Program failed `{:}`", adb_path);
880+
}
878881

879-
Command::new(adb_path)
882+
let status = Command::new(adb_path)
880883
.args(&["forward", "tcp:5039", "tcp:5039"])
881884
.status()
882885
.unwrap_or_else(|_| panic!("failed to exec `{:?}`", adb_path));
886+
if !status.success() {
887+
panic!("Program failed `{:}`", adb_path);
888+
}
883889

884890
let adb_arg = format!(
885891
"export LD_LIBRARY_PATH={}; \

0 commit comments

Comments
 (0)