@@ -99,6 +99,34 @@ const BASE_SYSROOT_SUITE: &[TestCase] = &[
99
99
runner. run_out_command ( "gen_block_iterate" , & [ ] ) ;
100
100
} ) ,
101
101
TestCase :: build_bin_and_run ( "aot.raw-dylib" , "example/raw-dylib.rs" , & [ ] ) ,
102
+ TestCase :: custom ( "test.sysroot" , & |runner| {
103
+ apply_patches (
104
+ & runner. dirs ,
105
+ "sysroot_tests" ,
106
+ & runner. stdlib_source . join ( "library" ) ,
107
+ & SYSROOT_TESTS_SRC . to_path ( & runner. dirs ) ,
108
+ ) ;
109
+
110
+ SYSROOT_TESTS . clean ( & runner. dirs ) ;
111
+
112
+ let mut target_compiler = runner. target_compiler . clone ( ) ;
113
+ // coretests and alloctests produce a bunch of warnings. When running
114
+ // in rust's CI warnings are denied, so we have to override that here.
115
+ target_compiler. rustflags . push ( "--cap-lints=allow" . to_owned ( ) ) ;
116
+ // The standard library may have been compiled with -Zrandomize-layout.
117
+ target_compiler. rustflags . extend ( [ "--cfg" . to_owned ( ) , "randomized_layouts" . to_owned ( ) ] ) ;
118
+
119
+ if runner. is_native {
120
+ let mut test_cmd = SYSROOT_TESTS . test ( & target_compiler, & runner. dirs ) ;
121
+ test_cmd. args ( [ "-p" , "coretests" , "-p" , "alloctests" , "--tests" , "--" , "-q" ] ) ;
122
+ spawn_and_wait ( test_cmd) ;
123
+ } else {
124
+ eprintln ! ( "Cross-Compiling: Not running tests" ) ;
125
+ let mut build_cmd = SYSROOT_TESTS . build ( & target_compiler, & runner. dirs ) ;
126
+ build_cmd. args ( [ "-p" , "coretests" , "-p" , "alloctests" , "--tests" ] ) ;
127
+ spawn_and_wait ( build_cmd) ;
128
+ }
129
+ } ) ,
102
130
] ;
103
131
104
132
pub ( crate ) static RAND_REPO : GitRepo = GitRepo :: github (
@@ -146,27 +174,6 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
146
174
spawn_and_wait ( build_cmd) ;
147
175
}
148
176
} ) ,
149
- TestCase :: custom ( "test.sysroot" , & |runner| {
150
- apply_patches (
151
- & runner. dirs ,
152
- "sysroot_tests" ,
153
- & runner. stdlib_source . join ( "library" ) ,
154
- & SYSROOT_TESTS_SRC . to_path ( & runner. dirs ) ,
155
- ) ;
156
-
157
- SYSROOT_TESTS . clean ( & runner. dirs ) ;
158
-
159
- if runner. is_native {
160
- let mut test_cmd = SYSROOT_TESTS . test ( & runner. target_compiler , & runner. dirs ) ;
161
- test_cmd. args ( [ "-p" , "coretests" , "-p" , "alloctests" , "--" , "-q" ] ) ;
162
- spawn_and_wait ( test_cmd) ;
163
- } else {
164
- eprintln ! ( "Cross-Compiling: Not running tests" ) ;
165
- let mut build_cmd = SYSROOT_TESTS . build ( & runner. target_compiler , & runner. dirs ) ;
166
- build_cmd. args ( [ "-p" , "coretests" , "-p" , "alloctests" , "--tests" ] ) ;
167
- spawn_and_wait ( build_cmd) ;
168
- }
169
- } ) ,
170
177
TestCase :: custom ( "test.regex" , & |runner| {
171
178
REGEX_REPO . patch ( & runner. dirs ) ;
172
179
0 commit comments