Skip to content

Commit 6c7c169

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

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

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

Lines changed: 17 additions & 5 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,14 +18,16 @@ 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+
.is_some()
25+
{
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")
@@ -32,6 +36,14 @@ pub fn compare_outputs(
3236
"{runner} ./rust_programs/target/{target}/release/{intrinsic_name}",
3337
))
3438
.output()
39+
// Command::new("sh")
40+
// .current_dir("rust_programs")
41+
// .arg("-c")
42+
// .arg(format!(
43+
// "cargo {toolchain} run --target {target} --bin {intrinsic_name} --release",
44+
// ))
45+
// .env("RUSTFLAGS", "-Cdebuginfo=0")
46+
// .output()
3547
};
3648

3749
let (c, rust) = match (c, rust) {

0 commit comments

Comments
 (0)