Skip to content

Commit 678ee80

Browse files
maintaining special list of targets which need different execution command
1 parent 5b20da3 commit 678ee80

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

crates/intrinsic-test/src/common/compare.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ use super::types::FailureReason;
22
use rayon::prelude::*;
33
use std::process::Command;
44

5+
static SPECIAL_TARGETS: [&str, 1] = [
6+
"aarch64_be-unknown-linux-gnu",
7+
]
8+
59
pub fn compare_outputs(
610
intrinsic_name_list: &Vec<String>,
7-
toolchain: &str,
11+
_toolchain: &str,
812
runner: &str,
913
target: &str,
1014
) -> bool {
@@ -16,21 +20,23 @@ pub fn compare_outputs(
1620
.arg(format!("{runner} ./c_programs/{intrinsic_name}"))
1721
.output();
1822

19-
let rust = if target != "aarch64_be-unknown-linux-gnu" {
23+
let rust = if SPECIAL_TARGETS
24+
.into_iter()
25+
.find(|&special_target| special_target == target) {
2026
Command::new("sh")
21-
.current_dir("rust_programs")
2227
.arg("-c")
2328
.arg(format!(
24-
"cargo {toolchain} run --target {target} --bin {intrinsic_name} --release",
29+
"{runner} ./rust_programs/target/{target}/release/{intrinsic_name}",
2530
))
26-
.env("RUSTFLAGS", "-Cdebuginfo=0")
2731
.output()
2832
} else {
2933
Command::new("sh")
34+
.current_dir("rust_programs")
3035
.arg("-c")
3136
.arg(format!(
32-
"{runner} ./rust_programs/target/{target}/release/{intrinsic_name}",
37+
"cargo {toolchain} run --target {target} --bin {intrinsic_name} --release",
3338
))
39+
.env("RUSTFLAGS", "-Cdebuginfo=0")
3440
.output()
3541
};
3642

0 commit comments

Comments
 (0)