Skip to content

Commit 64f4caa

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

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

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

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

5+
static SPECIAL_TARGETS: [&str; 1] = ["aarch64_be-unknown-linux-gnu"];
6+
57
pub fn compare_outputs(
68
intrinsic_name_list: &Vec<String>,
7-
toolchain: &str,
9+
_toolchain: &str,
810
runner: &str,
911
target: &str,
1012
) -> bool {
@@ -16,21 +18,24 @@ pub fn compare_outputs(
1618
.arg(format!("{runner} ./c_programs/{intrinsic_name}"))
1719
.output();
1820

19-
let rust = if target != "aarch64_be-unknown-linux-gnu" {
21+
let rust = if SPECIAL_TARGETS
22+
.into_iter()
23+
.find(|&special_target| special_target == target)
24+
{
2025
Command::new("sh")
21-
.current_dir("rust_programs")
2226
.arg("-c")
2327
.arg(format!(
24-
"cargo {toolchain} run --target {target} --bin {intrinsic_name} --release",
28+
"{runner} ./rust_programs/target/{target}/release/{intrinsic_name}",
2529
))
26-
.env("RUSTFLAGS", "-Cdebuginfo=0")
2730
.output()
2831
} else {
2932
Command::new("sh")
33+
.current_dir("rust_programs")
3034
.arg("-c")
3135
.arg(format!(
32-
"{runner} ./rust_programs/target/{target}/release/{intrinsic_name}",
36+
"cargo {toolchain} run --target {target} --bin {intrinsic_name} --release",
3337
))
38+
.env("RUSTFLAGS", "-Cdebuginfo=0")
3439
.output()
3540
};
3641

0 commit comments

Comments
 (0)