File tree Expand file tree Collapse file tree 3 files changed +16
-15
lines changed
crates/intrinsic-test/src Expand file tree Collapse file tree 3 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ impl SupportedArchitectureTest for ArmArchitectureTest {
104
104
}
105
105
106
106
fn compare_outputs ( & self ) -> bool {
107
- if let Some ( ref toolchain ) = self . cli_options . toolchain {
107
+ if self . cli_options . toolchain . is_some ( ) {
108
108
let intrinsics_name_list = self
109
109
. intrinsics
110
110
. iter ( )
@@ -113,8 +113,7 @@ impl SupportedArchitectureTest for ArmArchitectureTest {
113
113
114
114
compare_outputs (
115
115
& intrinsics_name_list,
116
- toolchain,
117
- & self . cli_options . c_runner ,
116
+ & self . cli_options . runner ,
118
117
& self . cli_options . target ,
119
118
)
120
119
} else {
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ pub struct ProcessedCli {
60
60
pub filename : PathBuf ,
61
61
pub toolchain : Option < String > ,
62
62
pub cpp_compiler : Option < String > ,
63
- pub c_runner : String ,
63
+ pub runner : String ,
64
64
pub target : String ,
65
65
pub linker : Option < String > ,
66
66
pub cxx_toolchain_dir : Option < String > ,
@@ -102,7 +102,7 @@ impl ProcessedCli {
102
102
Self {
103
103
toolchain,
104
104
cpp_compiler,
105
- c_runner,
105
+ runner : c_runner,
106
106
target,
107
107
linker,
108
108
cxx_toolchain_dir,
Original file line number Diff line number Diff line change @@ -4,24 +4,26 @@ use std::process::Command;
4
4
5
5
pub fn compare_outputs (
6
6
intrinsic_name_list : & Vec < String > ,
7
- toolchain : & str ,
8
7
runner : & str ,
9
8
target : & str ,
10
9
) -> bool {
10
+ fn runner_command ( runner : & str ) -> Command {
11
+ let mut it = runner. split_whitespace ( ) ;
12
+ let mut cmd = Command :: new ( it. next ( ) . unwrap ( ) ) ;
13
+ cmd. args ( it) ;
14
+
15
+ cmd
16
+ }
17
+
11
18
let intrinsics = intrinsic_name_list
12
19
. par_iter ( )
13
20
. filter_map ( |intrinsic_name| {
14
- let c = Command :: new ( "sh" )
15
- . arg ( "-c" )
16
- . arg ( format ! ( "{runner} ./c_programs/{intrinsic_name}" ) )
21
+ let c = runner_command ( runner)
22
+ . arg ( format ! ( "./c_programs/{intrinsic_name}" ) )
17
23
. output ( ) ;
18
24
19
- let rust = Command :: new ( "sh" )
20
- . current_dir ( "rust_programs" )
21
- . arg ( "-c" )
22
- . arg ( format ! (
23
- "cargo {toolchain} run --target {target} --bin {intrinsic_name} --release" ,
24
- ) )
25
+ let rust = runner_command ( runner)
26
+ . arg ( format ! ( "./rust_programs/target/{target}/release/{intrinsic_name}" ) )
25
27
. env ( "RUSTFLAGS" , "-Cdebuginfo=0" )
26
28
. output ( ) ;
27
29
You can’t perform that action at this time.
0 commit comments