@@ -101,6 +101,7 @@ fn test_lib(args: &[&str], test_name: &str) {
101
101
RUSTC_BUILD_STATUS . as_ref ( ) . expect ( "Could not build rustc!" ) ;
102
102
// Compiles the test project
103
103
let mut command = std:: process:: Command :: new ( "rustc" ) ;
104
+ command. arg ( "-Ctarget-feature=+x87+sse" ) ;
104
105
let command = command
105
106
. current_dir ( "./test/out" )
106
107
//.env("RUST_TARGET_PATH","../../")
@@ -113,7 +114,7 @@ fn test_lib(args: &[&str], test_name: &str) {
113
114
command
114
115
} ;
115
116
let out = command. output ( ) . expect ( "failed to execute process" ) ;
116
- if ! out. stderr . is_empty ( ) {
117
+ if String :: from_utf8 ( out. stderr . clone ( ) ) . unwrap ( ) . contains ( "error:" ) {
117
118
let stdout =
118
119
String :: from_utf8 ( out. stdout ) . expect ( "rustc error contained non-UTF8 characters." ) ;
119
120
let stderr =
@@ -164,7 +165,7 @@ macro_rules! compare_tests {
164
165
let copy = format!( "{cmd:?}" ) ;
165
166
let out = cmd. output( ) . expect( "failed to execute process" ) ;
166
167
// If stderr is not empty, then something went wrong, so print the stdout and stderr for debuging.
167
- if ! out. stderr. is_empty ( ) {
168
+ if String :: from_utf8 ( out. stderr. clone ( ) ) . unwrap ( ) . contains ( "error:" ) {
168
169
let stdout = String :: from_utf8( out. stdout)
169
170
. expect( "rustc error contained non-UTF8 characters." ) ;
170
171
let stderr = String :: from_utf8( out. stderr)
@@ -195,11 +196,12 @@ macro_rules! compare_tests {
195
196
concat!( "./" , stringify!( $test_name) , ".a" ) ,
196
197
"--edition" ,
197
198
"2021" ,
199
+ "-Ctarget-feature=+x87+sse" ,
198
200
] ) ;
199
201
let copy = format!( "{cmd:?}" ) ;
200
202
let out = cmd. output( ) . expect( "failed to execute process" ) ;
201
203
// If stderr is not empty, then something went wrong, so print the stdout and stderr for debuging.
202
- if ! out. stderr. is_empty ( ) {
204
+ if String :: from_utf8 ( out. stderr. clone ( ) ) . unwrap ( ) . contains ( "error:" ) {
203
205
let stdout = String :: from_utf8( out. stdout)
204
206
. expect( "rustc error contained non-UTF8 characters." ) ;
205
207
let stderr = String :: from_utf8( out. stderr)
@@ -242,7 +244,7 @@ macro_rules! compare_tests {
242
244
let mut cmd = super :: super :: compiler( stringify!( $test_name) , test_dir, true ) ;
243
245
let out = cmd. output( ) . expect( "failed to execute process" ) ;
244
246
// If stderr is not empty, then something went wrong, so print the stdout and stderr for debuging.
245
- if ! out. stderr. is_empty ( ) {
247
+ if String :: from_utf8 ( out. stderr. clone ( ) ) . unwrap ( ) . contains ( "error:" ) {
246
248
let stdout = String :: from_utf8( out. stdout)
247
249
. expect( "rustc error contained non-UTF8 characters." ) ;
248
250
let stderr = String :: from_utf8( out. stderr)
@@ -273,10 +275,11 @@ macro_rules! compare_tests {
273
275
concat!( "./" , stringify!( $test_name) , ".a" ) ,
274
276
"--edition" ,
275
277
"2021" ,
278
+ "-Ctarget-feature=+x87+sse" ,
276
279
] ) ;
277
280
let out = cmd. output( ) . expect( "failed to execute process" ) ;
278
281
// If stderr is not empty, then something went wrong, so print the stdout and stderr for debuging.
279
- if ! out. stderr. is_empty ( ) {
282
+ if String :: from_utf8 ( out. stderr. clone ( ) ) . unwrap ( ) . contains ( "error:" ) {
280
283
let stdout = String :: from_utf8( out. stdout)
281
284
. expect( "rustc error contained non-UTF8 characters." ) ;
282
285
let stderr = String :: from_utf8( out. stderr)
@@ -384,6 +387,7 @@ fn compiler(test_name: &str, test_dir: &str, release: bool) -> std::process::Com
384
387
if * crate :: config:: DRY_RUN {
385
388
cmd. args ( [ "-Z" , "no-codegen" ] ) ;
386
389
}
390
+ cmd. arg ( "-Ctarget-feature=+x87+sse" , ) ;
387
391
cmd
388
392
}
389
393
macro_rules! run_test {
@@ -410,7 +414,7 @@ macro_rules! run_test {
410
414
eprintln!( "Command: {cmd:?}" ) ;
411
415
let out = cmd. output( ) . expect( "failed to execute process" ) ;
412
416
// If stderr is not empty, then something went wrong, so print the stdout and stderr for debuging.
413
- if ! out. stderr. is_empty ( ) {
417
+ if String :: from_utf8 ( out. stderr. clone ( ) ) . unwrap ( ) . contains ( "error:" ) {
414
418
let stdout = String :: from_utf8( out. stdout)
415
419
. expect( "rustc error contained non-UTF8 characters." ) ;
416
420
let stderr = String :: from_utf8( out. stderr)
@@ -444,7 +448,7 @@ macro_rules! run_test {
444
448
eprintln!( "test_name:{test_name:?}" ) ;
445
449
let out = cmd. output( ) . expect( "failed to execute process" ) ;
446
450
// If stderr is not empty, then something went wrong, so print the stdout and stderr for debuging.
447
- if ! out. stderr. is_empty ( ) {
451
+ if String :: from_utf8 ( out. stderr. clone ( ) ) . unwrap ( ) . contains ( "error:" ) {
448
452
let stdout = String :: from_utf8( out. stdout)
449
453
. expect( "rustc error contained non-UTF8 characters." ) ;
450
454
let stderr = String :: from_utf8( out. stderr)
@@ -732,6 +736,7 @@ run_test! {alloc,abox,stable}
732
736
run_test ! { alloc, raw_vec, stable}
733
737
run_test ! { alloc, slice_to_owned, stable}
734
738
run_test ! { arthm, add, stable}
739
+ run_test ! { arthm, ptr, stable}
735
740
run_test ! { arthm, cmp, stable}
736
741
run_test ! { arthm, greater_than, stable}
737
742
run_test ! { arthm, max, stable}
@@ -764,7 +769,7 @@ run_test! {intrinsics,cmp_bytes,stable}
764
769
run_test ! { intrinsics, copy_nonoverlaping, stable}
765
770
run_test ! { intrinsics, ctpop, stable}
766
771
run_test ! { intrinsics, malloc, stable}
767
- run_test ! { intrinsics, offset_of, unstable }
772
+ run_test ! { intrinsics, offset_of, stable }
768
773
run_test ! { intrinsics, overflow_ops, stable}
769
774
run_test ! { intrinsics, pow_sqrt, stable}
770
775
run_test ! { intrinsics, printf, stable}
@@ -783,11 +788,11 @@ run_test! {std,const_error,stable}
783
788
run_test ! { std, cell_test, unstable}
784
789
run_test ! { std, cstr, unstable}
785
790
run_test ! { std, format, unstable}
786
- run_test ! { std, futex_test, unstable }
787
- run_test ! { std, futexrw_test, unstable }
791
+ run_test ! { std, futex_test, stable }
792
+ run_test ! { std, futexrw_test, stable }
788
793
run_test ! { std, main, stable}
789
794
run_test ! { std, mutithreading, stable}
790
- run_test ! { std, once_lock_test, unstable }
795
+ run_test ! { std, once_lock_test, stable }
791
796
run_test ! { std, tlocal_key_test, stable}
792
797
run_test ! { std, uninit_fill, stable}
793
798
@@ -797,7 +802,7 @@ run_test! {types,f16,stable}
797
802
run_test ! { types, aligned, stable}
798
803
run_test ! { types, any, stable}
799
804
run_test ! { types, arr, stable}
800
- run_test ! { types, async_types, unstable }
805
+ run_test ! { types, async_types, stable }
801
806
run_test ! { types, dst, stable}
802
807
run_test ! { types, dyns, stable}
803
808
run_test ! { types, enums, stable}
@@ -951,7 +956,7 @@ compare_tests! {fuzz,fail8,stable}
951
956
952
957
compare_tests ! { fuzz, fail9, stable}
953
958
// TODO: fix this test. It is a NaN issue, so it is a very low prioity, but it should still get fixed or something.
954
- compare_tests ! { fuzz, fail10, unstable }
959
+ compare_tests ! { fuzz, fail10, stable }
955
960
compare_tests ! { fuzz, fail11, stable}
956
961
957
962
cargo_test ! { hello_world, stable}
0 commit comments