Skip to content

Commit b124388

Browse files
committed
---
yaml --- r: 274643 b: refs/heads/stable c: 7afb56f h: refs/heads/master i: 274641: 5dfa5b2 274639: 8dd0804
1 parent 6043fc7 commit b124388

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: bd3fe498e5d1587e8081607731113593cee1c0dc
32+
refs/heads/stable: 7afb56f51e52030fbdda07c38f9ae09a1daeed9f
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/compiletest/runtest.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,12 @@ fn make_lib_name(config: &Config, auxfile: &Path, testfile: &Path) -> PathBuf {
13571357

13581358
fn make_exe_name(config: &Config, testfile: &Path) -> PathBuf {
13591359
let mut f = output_base_name(config, testfile);
1360-
if !env::consts::EXE_SUFFIX.is_empty() {
1360+
// FIXME: This is using the host architecture exe suffix, not target!
1361+
if config.target == "asmjs-unknown-emscripten" {
1362+
let mut fname = f.file_name().unwrap().to_os_string();
1363+
fname.push(".js");
1364+
f.set_file_name(&fname);
1365+
} else if !env::consts::EXE_SUFFIX.is_empty() {
13611366
let mut fname = f.file_name().unwrap().to_os_string();
13621367
fname.push(env::consts::EXE_SUFFIX);
13631368
f.set_file_name(&fname);
@@ -1370,6 +1375,12 @@ fn make_run_args(config: &Config, props: &TestProps, testfile: &Path)
13701375
// If we've got another tool to run under (valgrind),
13711376
// then split apart its command
13721377
let mut args = split_maybe_args(&config.runtool);
1378+
1379+
// If this is emscripten, then run tests under nodejs
1380+
if config.target == "asmjs-unknown-emscripten" {
1381+
args.push("nodejs".to_owned());
1382+
}
1383+
13731384
let exe_file = make_exe_name(config, testfile);
13741385

13751386
// FIXME (#9639): This needs to handle non-utf8 paths

branches/stable/src/compiletest/util.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const OS_TABLE: &'static [(&'static str, &'static str)] = &[
2626
("win32", "windows"),
2727
("windows", "windows"),
2828
("solaris", "solaris"),
29+
("emscripten", "emscripten"),
2930
];
3031

3132
const ARCH_TABLE: &'static [(&'static str, &'static str)] = &[
@@ -44,6 +45,7 @@ const ARCH_TABLE: &'static [(&'static str, &'static str)] = &[
4445
("sparc", "sparc"),
4546
("x86_64", "x86_64"),
4647
("xcore", "xcore"),
48+
("asmjs", "asmjs"),
4749
];
4850

4951
pub fn get_os(triple: &str) -> &'static str {

0 commit comments

Comments
 (0)