1
1
use std:: ffi:: OsStr ;
2
- use std:: fs;
3
2
use std:: path:: PathBuf ;
4
3
use std:: process:: Command ;
5
4
@@ -126,9 +125,9 @@ static PORTABLE_SIMD_SRC: RelPath = RelPath::build("portable-simd");
126
125
127
126
static PORTABLE_SIMD : CargoProject = CargoProject :: new ( & PORTABLE_SIMD_SRC , "portable-simd_target" ) ;
128
127
129
- static LIBCORE_TESTS_SRC : RelPath = RelPath :: build ( "coretests " ) ;
128
+ static SYSROOT_TESTS_SRC : RelPath = RelPath :: build ( "sysroot_tests " ) ;
130
129
131
- static LIBCORE_TESTS : CargoProject = CargoProject :: new ( & LIBCORE_TESTS_SRC , "coretests_target " ) ;
130
+ static SYSROOT_TESTS : CargoProject = CargoProject :: new ( & SYSROOT_TESTS_SRC , "sysroot_tests_target " ) ;
132
131
133
132
const EXTENDED_SYSROOT_SUITE : & [ TestCase ] = & [
134
133
TestCase :: custom ( "test.rust-random/rand" , & |runner| {
@@ -147,28 +146,24 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
147
146
spawn_and_wait ( build_cmd) ;
148
147
}
149
148
} ) ,
150
- TestCase :: custom ( "test.libcore " , & |runner| {
149
+ TestCase :: custom ( "test.sysroot " , & |runner| {
151
150
apply_patches (
152
151
& runner. dirs ,
153
- "coretests " ,
154
- & runner. stdlib_source . join ( "library/coretests " ) ,
155
- & LIBCORE_TESTS_SRC . to_path ( & runner. dirs ) ,
152
+ "sysroot_tests " ,
153
+ & runner. stdlib_source . join ( "library" ) ,
154
+ & SYSROOT_TESTS_SRC . to_path ( & runner. dirs ) ,
156
155
) ;
157
156
158
- let source_lockfile = runner. dirs . source_dir . join ( "patches/coretests-lock.toml" ) ;
159
- let target_lockfile = LIBCORE_TESTS_SRC . to_path ( & runner. dirs ) . join ( "Cargo.lock" ) ;
160
- fs:: copy ( source_lockfile, target_lockfile) . unwrap ( ) ;
161
-
162
- LIBCORE_TESTS . clean ( & runner. dirs ) ;
157
+ SYSROOT_TESTS . clean ( & runner. dirs ) ;
163
158
164
159
if runner. is_native {
165
- let mut test_cmd = LIBCORE_TESTS . test ( & runner. target_compiler , & runner. dirs ) ;
166
- test_cmd. arg ( "--" ) . arg ( "-q" ) ;
160
+ let mut test_cmd = SYSROOT_TESTS . test ( & runner. target_compiler , & runner. dirs ) ;
161
+ test_cmd. args ( [ "-p" , "coretests" , "--" , "-q" ] ) ;
167
162
spawn_and_wait ( test_cmd) ;
168
163
} else {
169
164
eprintln ! ( "Cross-Compiling: Not running tests" ) ;
170
- let mut build_cmd = LIBCORE_TESTS . build ( & runner. target_compiler , & runner. dirs ) ;
171
- build_cmd. arg ( "-- tests") ;
165
+ let mut build_cmd = SYSROOT_TESTS . build ( & runner. target_compiler , & runner. dirs ) ;
166
+ build_cmd. args ( [ "-p" , "coretests" , "-- tests"] ) ;
172
167
spawn_and_wait ( build_cmd) ;
173
168
}
174
169
} ) ,
0 commit comments