Skip to content

Commit

Permalink
Auto merge of #3005 - JohnTitor:fix-android-ci, r=JohnTitor
Browse files Browse the repository at this point in the history
ci: Read test output from stderr

CI is currently failing because JohnTitor/ctest2#37 changed the place to display the test results and `runtest-android.rs` cannot find it on stdout. This PR fixes it by reading lines from stderr instead.

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
  • Loading branch information
bors committed Nov 19, 2022
2 parents bbf929d + 0d37343 commit c77729d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ci/runtest-android.rs
Expand Up @@ -22,7 +22,7 @@ fn main() {
.arg(&test)
.arg(&dst)
.status()
.expect("failed to run: adb pushr");
.expect("failed to run: adb push");
assert!(status.success());

let output = Command::new("adb")
Expand All @@ -38,8 +38,8 @@ fn main() {
String::from_utf8_lossy(&output.stdout),
String::from_utf8_lossy(&output.stderr));

let stdout = String::from_utf8_lossy(&output.stdout);
stdout.lines().find(|l|
let stderr = String::from_utf8_lossy(&output.stderr);
stderr.lines().find(|l|
(l.starts_with("PASSED ") && l.contains(" tests")) ||
l.starts_with("test result: ok")
).unwrap_or_else(|| {
Expand Down

0 comments on commit c77729d

Please sign in to comment.