11use std:: ffi:: OsStr ;
2- use std:: fs;
32use std:: path:: PathBuf ;
43use std:: process:: Command ;
54
@@ -126,9 +125,9 @@ static PORTABLE_SIMD_SRC: RelPath = RelPath::build("portable-simd");
126125
127126static PORTABLE_SIMD : CargoProject = CargoProject :: new ( & PORTABLE_SIMD_SRC , "portable-simd_target" ) ;
128127
129- static LIBCORE_TESTS_SRC : RelPath = RelPath :: build ( "coretests " ) ;
128+ static SYSROOT_TESTS_SRC : RelPath = RelPath :: build ( "sysroot_tests " ) ;
130129
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 " ) ;
132131
133132const EXTENDED_SYSROOT_SUITE : & [ TestCase ] = & [
134133 TestCase :: custom ( "test.rust-random/rand" , & |runner| {
@@ -147,28 +146,24 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
147146 spawn_and_wait ( build_cmd) ;
148147 }
149148 } ) ,
150- TestCase :: custom ( "test.libcore " , & |runner| {
149+ TestCase :: custom ( "test.sysroot " , & |runner| {
151150 apply_patches (
152151 & 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 ) ,
156155 ) ;
157156
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 ) ;
163158
164159 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" ] ) ;
167162 spawn_and_wait ( test_cmd) ;
168163 } else {
169164 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"] ) ;
172167 spawn_and_wait ( build_cmd) ;
173168 }
174169 } ) ,
0 commit comments