Skip to content

Commit fcd3279

Browse files
committed
Improve bootstrap crate testing for emscripten
1 parent f41b363 commit fcd3279

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/bootstrap/check.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,19 @@ fn krate_emscripten(build: &Build,
385385

386386
for test in tests {
387387
let test_file_name = test.to_string_lossy().into_owned();
388-
let output = output(Command::new("node").arg(&test_file_name));
389-
println!("{}", output);
388+
println!("running {}", test_file_name);
389+
let output = Command::new("node")
390+
.arg(&test_file_name)
391+
.stderr(::std::process::Stdio::inherit())
392+
.output();
393+
let output = match output {
394+
Ok(status) => status,
395+
Err(e) => panic!(format!("failed to execute command: {}", e)),
396+
};
397+
println!("{}", String::from_utf8(output.stdout).unwrap());
398+
if !output.status.success() {
399+
panic!("some tests failed");
400+
}
390401
}
391402
}
392403

@@ -402,7 +413,7 @@ fn find_tests(dir: &Path,
402413
let filename = e.file_name().into_string().unwrap();
403414
if (target.contains("windows") && filename.ends_with(".exe")) ||
404415
(!target.contains("windows") && !filename.contains(".")) ||
405-
(target.contains("asmjs") && filename.contains(".js")){
416+
(target.contains("emscripten") && filename.contains(".js")){
406417
dst.push(e.path());
407418
}
408419
}

0 commit comments

Comments
 (0)