File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
crates/intrinsic-test/src Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,7 @@ use super::cli::FailureReason;
2
2
use rayon:: prelude:: * ;
3
3
use std:: process:: Command ;
4
4
5
- pub fn compare_outputs (
6
- intrinsic_name_list : & Vec < String > ,
7
- runner : & str ,
8
- target : & str ,
9
- ) -> bool {
5
+ pub fn compare_outputs ( intrinsic_name_list : & Vec < String > , runner : & str , target : & str ) -> bool {
10
6
fn runner_command ( runner : & str ) -> Command {
11
7
let mut it = runner. split_whitespace ( ) ;
12
8
let mut cmd = Command :: new ( it. next ( ) . unwrap ( ) ) ;
@@ -18,11 +14,11 @@ pub fn compare_outputs(
18
14
let intrinsics = intrinsic_name_list
19
15
. par_iter ( )
20
16
. filter_map ( |intrinsic_name| {
21
- let c = runner_command ( runner)
17
+ let c = runner_command ( runner)
22
18
. arg ( format ! ( "./c_programs/{intrinsic_name}" ) )
23
19
. output ( ) ;
24
20
25
- let rust = runner_command ( runner)
21
+ let rust = runner_command ( runner)
26
22
. arg ( format ! ( "./rust_programs/target/{target}/release/{intrinsic_name}" ) )
27
23
. env ( "RUSTFLAGS" , "-Cdebuginfo=0" )
28
24
. output ( ) ;
Original file line number Diff line number Diff line change @@ -66,7 +66,11 @@ pub fn compile_c_programs(compiler_commands: &[String]) -> bool {
66
66
compiler_commands
67
67
. par_iter ( )
68
68
. map ( |compiler_command| {
69
- let output = Command :: new ( "sh" ) . arg ( "-c" ) . arg ( compiler_command) . output ( ) ;
69
+ let mut it = compiler_command. split_whitespace ( ) ;
70
+ let mut cmd = Command :: new ( it. next ( ) . unwrap ( ) ) ;
71
+ cmd. args ( it) ;
72
+
73
+ let output = cmd. output ( ) ;
70
74
if let Ok ( output) = output {
71
75
if output. status . success ( ) {
72
76
true
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ fn main() {
38
38
if !test_environment. build_rust_file ( ) {
39
39
std:: process:: exit ( 3 ) ;
40
40
}
41
- info ! ( "comaparing outputs" ) ;
41
+ info ! ( "comparing outputs" ) ;
42
42
if !test_environment. compare_outputs ( ) {
43
43
std:: process:: exit ( 1 ) ;
44
44
}
You can’t perform that action at this time.
0 commit comments