@@ -138,6 +138,26 @@ static LIBCORE_TESTS_SRC: RelPath = RelPath::BUILD.join("coretests");
138
138
139
139
static LIBCORE_TESTS : CargoProject = CargoProject :: new ( & LIBCORE_TESTS_SRC , "coretests_target" ) ;
140
140
141
+ pub ( crate ) static IMAGE_REPO : GitRepo = GitRepo :: github (
142
+ "image-rs" ,
143
+ "image" ,
144
+ "6efcc15589640b6bd1c0dc85ec1e39910ea6c58f" ,
145
+ "77d7061e3ef3f58c" ,
146
+ "image" ,
147
+ ) ;
148
+
149
+ static IMAGE : CargoProject = CargoProject :: new ( & IMAGE_REPO . source_dir ( ) , "image_target" ) ;
150
+
151
+ pub ( crate ) static BLAKE3_REPO : GitRepo = GitRepo :: github (
152
+ "BLAKE3-team" ,
153
+ "BLAKE3" ,
154
+ "3f396d223946f722ab060fe9377cd1cebacaf4c0" ,
155
+ "26d5a53578977197" ,
156
+ "blake3" ,
157
+ ) ;
158
+
159
+ static BLAKE3 : CargoProject = CargoProject :: new ( & BLAKE3_REPO . source_dir ( ) , "blake3_target" ) ;
160
+
141
161
const EXTENDED_SYSROOT_SUITE : & [ TestCase ] = & [
142
162
TestCase :: custom ( "test.rust-random/rand" , & |runner| {
143
163
RAND_REPO . patch ( & runner. dirs ) ;
@@ -233,6 +253,59 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
233
253
spawn_and_wait ( test_cmd) ;
234
254
}
235
255
} ) ,
256
+ TestCase :: custom ( "test.image-fractal" , & |runner| {
257
+ IMAGE_REPO . patch ( & runner. dirs ) ;
258
+
259
+ IMAGE . clean ( & runner. dirs ) ;
260
+
261
+ let mut build_cmd = IMAGE . build ( & runner. target_compiler , & runner. dirs ) ;
262
+ build_cmd
263
+ . arg ( "--example" )
264
+ . arg ( "fractal" )
265
+ . arg ( "--no-default-features" )
266
+ . arg ( "--features" )
267
+ . arg ( "png" ) ;
268
+ spawn_and_wait ( build_cmd) ;
269
+
270
+ if runner. is_native {
271
+ let mut run_cmd = IMAGE . run ( & runner. target_compiler , & runner. dirs ) ;
272
+ run_cmd
273
+ . arg ( "--example" )
274
+ . arg ( "fractal" )
275
+ . arg ( "--no-default-features" )
276
+ . arg ( "--features" )
277
+ . arg ( "png" ) ;
278
+ run_cmd. current_dir ( IMAGE . target_dir ( & runner. dirs ) ) ;
279
+
280
+ spawn_and_wait ( run_cmd) ;
281
+
282
+ let expected =
283
+ fs:: read ( IMAGE . source_dir ( & runner. dirs ) . join ( "examples" ) . join ( "fractal.png" ) )
284
+ . unwrap ( ) ;
285
+ let output = fs:: read ( IMAGE . target_dir ( & runner. dirs ) . join ( "fractal.png" ) ) . unwrap ( ) ;
286
+
287
+ if output != expected {
288
+ println ! ( "Output files don't match!" ) ;
289
+
290
+ std:: process:: exit ( 1 ) ;
291
+ }
292
+ }
293
+ } ) ,
294
+ TestCase :: custom ( "test.blake3" , & |runner| {
295
+ BLAKE3_REPO . patch ( & runner. dirs ) ;
296
+
297
+ BLAKE3 . clean ( & runner. dirs ) ;
298
+
299
+ let mut build_cmd = BLAKE3 . build ( & runner. target_compiler , & runner. dirs ) ;
300
+ build_cmd. arg ( "--all-targets" ) ;
301
+ spawn_and_wait ( build_cmd) ;
302
+
303
+ if runner. is_native {
304
+ let mut test_cmd = BLAKE3 . test ( & runner. target_compiler , & runner. dirs ) ;
305
+ test_cmd. arg ( "-q" ) ;
306
+ spawn_and_wait ( test_cmd) ;
307
+ }
308
+ } ) ,
236
309
] ;
237
310
238
311
pub ( crate ) fn run_tests (
0 commit comments