@@ -210,15 +210,15 @@ fn should_fail() {
210210
211211 let d = make_test_description ( & config, tn. clone ( ) , p, std:: io:: Cursor :: new ( "" ) , None ) ;
212212 assert_eq ! ( d. should_panic, test:: ShouldPanic :: No ) ;
213- let d = make_test_description ( & config, tn, p, std:: io:: Cursor :: new ( "// should-fail" ) , None ) ;
213+ let d = make_test_description ( & config, tn, p, std:: io:: Cursor :: new ( "//@ should-fail" ) , None ) ;
214214 assert_eq ! ( d. should_panic, test:: ShouldPanic :: Yes ) ;
215215}
216216
217217#[ test]
218218fn revisions ( ) {
219219 let config: Config = cfg ( ) . build ( ) ;
220220
221- assert_eq ! ( parse_rs( & config, "// revisions: a b c" ) . revisions, vec![ "a" , "b" , "c" ] , ) ;
221+ assert_eq ! ( parse_rs( & config, "//@ revisions: a b c" ) . revisions, vec![ "a" , "b" , "c" ] , ) ;
222222 assert_eq ! (
223223 parse_makefile( & config, "# revisions: hello there" ) . revisions,
224224 vec![ "hello" , "there" ] ,
@@ -233,8 +233,8 @@ fn aux_build() {
233233 parse_rs(
234234 & config,
235235 r"
236- // aux-build: a.rs
237- // aux-build: b.rs
236+ //@ aux-build: a.rs
237+ //@ aux-build: b.rs
238238 "
239239 )
240240 . aux,
@@ -245,128 +245,128 @@ fn aux_build() {
245245#[ test]
246246fn llvm_version ( ) {
247247 let config: Config = cfg ( ) . llvm_version ( "8.1.2" ) . build ( ) ;
248- assert ! ( check_ignore( & config, "// min-llvm-version: 9.0" ) ) ;
248+ assert ! ( check_ignore( & config, "//@ min-llvm-version: 9.0" ) ) ;
249249
250250 let config: Config = cfg ( ) . llvm_version ( "9.0.1" ) . build ( ) ;
251- assert ! ( check_ignore( & config, "// min-llvm-version: 9.2" ) ) ;
251+ assert ! ( check_ignore( & config, "//@ min-llvm-version: 9.2" ) ) ;
252252
253253 let config: Config = cfg ( ) . llvm_version ( "9.3.1" ) . build ( ) ;
254- assert ! ( !check_ignore( & config, "// min-llvm-version: 9.2" ) ) ;
254+ assert ! ( !check_ignore( & config, "//@ min-llvm-version: 9.2" ) ) ;
255255
256256 let config: Config = cfg ( ) . llvm_version ( "10.0.0" ) . build ( ) ;
257- assert ! ( !check_ignore( & config, "// min-llvm-version: 9.0" ) ) ;
257+ assert ! ( !check_ignore( & config, "//@ min-llvm-version: 9.0" ) ) ;
258258}
259259
260260#[ test]
261261fn system_llvm_version ( ) {
262262 let config: Config = cfg ( ) . system_llvm ( true ) . llvm_version ( "17.0.0" ) . build ( ) ;
263- assert ! ( check_ignore( & config, "// min-system-llvm-version: 18.0" ) ) ;
263+ assert ! ( check_ignore( & config, "//@ min-system-llvm-version: 18.0" ) ) ;
264264
265265 let config: Config = cfg ( ) . system_llvm ( true ) . llvm_version ( "18.0.0" ) . build ( ) ;
266- assert ! ( !check_ignore( & config, "// min-system-llvm-version: 18.0" ) ) ;
266+ assert ! ( !check_ignore( & config, "//@ min-system-llvm-version: 18.0" ) ) ;
267267
268268 let config: Config = cfg ( ) . llvm_version ( "17.0.0" ) . build ( ) ;
269- assert ! ( !check_ignore( & config, "// min-system-llvm-version: 18.0" ) ) ;
269+ assert ! ( !check_ignore( & config, "//@ min-system-llvm-version: 18.0" ) ) ;
270270}
271271
272272#[ test]
273273fn ignore_target ( ) {
274274 let config: Config = cfg ( ) . target ( "x86_64-unknown-linux-gnu" ) . build ( ) ;
275275
276- assert ! ( check_ignore( & config, "// ignore-x86_64-unknown-linux-gnu" ) ) ;
277- assert ! ( check_ignore( & config, "// ignore-x86_64" ) ) ;
278- assert ! ( check_ignore( & config, "// ignore-linux" ) ) ;
279- assert ! ( check_ignore( & config, "// ignore-gnu" ) ) ;
280- assert ! ( check_ignore( & config, "// ignore-64bit" ) ) ;
276+ assert ! ( check_ignore( & config, "//@ ignore-x86_64-unknown-linux-gnu" ) ) ;
277+ assert ! ( check_ignore( & config, "//@ ignore-x86_64" ) ) ;
278+ assert ! ( check_ignore( & config, "//@ ignore-linux" ) ) ;
279+ assert ! ( check_ignore( & config, "//@ ignore-gnu" ) ) ;
280+ assert ! ( check_ignore( & config, "//@ ignore-64bit" ) ) ;
281281
282- assert ! ( !check_ignore( & config, "// ignore-x86" ) ) ;
283- assert ! ( !check_ignore( & config, "// ignore-windows" ) ) ;
284- assert ! ( !check_ignore( & config, "// ignore-msvc" ) ) ;
285- assert ! ( !check_ignore( & config, "// ignore-32bit" ) ) ;
282+ assert ! ( !check_ignore( & config, "//@ ignore-x86" ) ) ;
283+ assert ! ( !check_ignore( & config, "//@ ignore-windows" ) ) ;
284+ assert ! ( !check_ignore( & config, "//@ ignore-msvc" ) ) ;
285+ assert ! ( !check_ignore( & config, "//@ ignore-32bit" ) ) ;
286286}
287287
288288#[ test]
289289fn only_target ( ) {
290290 let config: Config = cfg ( ) . target ( "x86_64-pc-windows-gnu" ) . build ( ) ;
291291
292- assert ! ( check_ignore( & config, "// only-x86" ) ) ;
293- assert ! ( check_ignore( & config, "// only-linux" ) ) ;
294- assert ! ( check_ignore( & config, "// only-msvc" ) ) ;
295- assert ! ( check_ignore( & config, "// only-32bit" ) ) ;
292+ assert ! ( check_ignore( & config, "//@ only-x86" ) ) ;
293+ assert ! ( check_ignore( & config, "//@ only-linux" ) ) ;
294+ assert ! ( check_ignore( & config, "//@ only-msvc" ) ) ;
295+ assert ! ( check_ignore( & config, "//@ only-32bit" ) ) ;
296296
297- assert ! ( !check_ignore( & config, "// only-x86_64-pc-windows-gnu" ) ) ;
298- assert ! ( !check_ignore( & config, "// only-x86_64" ) ) ;
299- assert ! ( !check_ignore( & config, "// only-windows" ) ) ;
300- assert ! ( !check_ignore( & config, "// only-gnu" ) ) ;
301- assert ! ( !check_ignore( & config, "// only-64bit" ) ) ;
297+ assert ! ( !check_ignore( & config, "//@ only-x86_64-pc-windows-gnu" ) ) ;
298+ assert ! ( !check_ignore( & config, "//@ only-x86_64" ) ) ;
299+ assert ! ( !check_ignore( & config, "//@ only-windows" ) ) ;
300+ assert ! ( !check_ignore( & config, "//@ only-gnu" ) ) ;
301+ assert ! ( !check_ignore( & config, "//@ only-64bit" ) ) ;
302302}
303303
304304#[ test]
305305fn stage ( ) {
306306 let config: Config = cfg ( ) . stage_id ( "stage1-x86_64-unknown-linux-gnu" ) . build ( ) ;
307307
308- assert ! ( check_ignore( & config, "// ignore-stage1" ) ) ;
309- assert ! ( !check_ignore( & config, "// ignore-stage2" ) ) ;
308+ assert ! ( check_ignore( & config, "//@ ignore-stage1" ) ) ;
309+ assert ! ( !check_ignore( & config, "//@ ignore-stage2" ) ) ;
310310}
311311
312312#[ test]
313313fn cross_compile ( ) {
314314 let config: Config = cfg ( ) . host ( "x86_64-apple-darwin" ) . target ( "wasm32-unknown-unknown" ) . build ( ) ;
315- assert ! ( check_ignore( & config, "// ignore-cross-compile" ) ) ;
315+ assert ! ( check_ignore( & config, "//@ ignore-cross-compile" ) ) ;
316316
317317 let config: Config = cfg ( ) . host ( "x86_64-apple-darwin" ) . target ( "x86_64-apple-darwin" ) . build ( ) ;
318- assert ! ( !check_ignore( & config, "// ignore-cross-compile" ) ) ;
318+ assert ! ( !check_ignore( & config, "//@ ignore-cross-compile" ) ) ;
319319}
320320
321321#[ test]
322322fn debugger ( ) {
323323 let mut config = cfg ( ) . build ( ) ;
324324 config. debugger = None ;
325- assert ! ( !check_ignore( & config, "// ignore-cdb" ) ) ;
325+ assert ! ( !check_ignore( & config, "//@ ignore-cdb" ) ) ;
326326
327327 config. debugger = Some ( Debugger :: Cdb ) ;
328- assert ! ( check_ignore( & config, "// ignore-cdb" ) ) ;
328+ assert ! ( check_ignore( & config, "//@ ignore-cdb" ) ) ;
329329
330330 config. debugger = Some ( Debugger :: Gdb ) ;
331- assert ! ( check_ignore( & config, "// ignore-gdb" ) ) ;
331+ assert ! ( check_ignore( & config, "//@ ignore-gdb" ) ) ;
332332
333333 config. debugger = Some ( Debugger :: Lldb ) ;
334- assert ! ( check_ignore( & config, "// ignore-lldb" ) ) ;
334+ assert ! ( check_ignore( & config, "//@ ignore-lldb" ) ) ;
335335}
336336
337337#[ test]
338338fn git_hash ( ) {
339339 let config: Config = cfg ( ) . git_hash ( false ) . build ( ) ;
340- assert ! ( check_ignore( & config, "// needs-git-hash" ) ) ;
340+ assert ! ( check_ignore( & config, "//@ needs-git-hash" ) ) ;
341341
342342 let config: Config = cfg ( ) . git_hash ( true ) . build ( ) ;
343- assert ! ( !check_ignore( & config, "// needs-git-hash" ) ) ;
343+ assert ! ( !check_ignore( & config, "//@ needs-git-hash" ) ) ;
344344}
345345
346346#[ test]
347347fn sanitizers ( ) {
348348 // Target that supports all sanitizers:
349349 let config: Config = cfg ( ) . target ( "x86_64-unknown-linux-gnu" ) . build ( ) ;
350- assert ! ( !check_ignore( & config, "// needs-sanitizer-address" ) ) ;
351- assert ! ( !check_ignore( & config, "// needs-sanitizer-leak" ) ) ;
352- assert ! ( !check_ignore( & config, "// needs-sanitizer-memory" ) ) ;
353- assert ! ( !check_ignore( & config, "// needs-sanitizer-thread" ) ) ;
350+ assert ! ( !check_ignore( & config, "//@ needs-sanitizer-address" ) ) ;
351+ assert ! ( !check_ignore( & config, "//@ needs-sanitizer-leak" ) ) ;
352+ assert ! ( !check_ignore( & config, "//@ needs-sanitizer-memory" ) ) ;
353+ assert ! ( !check_ignore( & config, "//@ needs-sanitizer-thread" ) ) ;
354354
355355 // Target that doesn't support sanitizers:
356356 let config: Config = cfg ( ) . target ( "wasm32-unknown-emscripten" ) . build ( ) ;
357- assert ! ( check_ignore( & config, "// needs-sanitizer-address" ) ) ;
358- assert ! ( check_ignore( & config, "// needs-sanitizer-leak" ) ) ;
359- assert ! ( check_ignore( & config, "// needs-sanitizer-memory" ) ) ;
360- assert ! ( check_ignore( & config, "// needs-sanitizer-thread" ) ) ;
357+ assert ! ( check_ignore( & config, "//@ needs-sanitizer-address" ) ) ;
358+ assert ! ( check_ignore( & config, "//@ needs-sanitizer-leak" ) ) ;
359+ assert ! ( check_ignore( & config, "//@ needs-sanitizer-memory" ) ) ;
360+ assert ! ( check_ignore( & config, "//@ needs-sanitizer-thread" ) ) ;
361361}
362362
363363#[ test]
364364fn profiler_support ( ) {
365365 let config: Config = cfg ( ) . profiler_support ( false ) . build ( ) ;
366- assert ! ( check_ignore( & config, "// needs-profiler-support" ) ) ;
366+ assert ! ( check_ignore( & config, "//@ needs-profiler-support" ) ) ;
367367
368368 let config: Config = cfg ( ) . profiler_support ( true ) . build ( ) ;
369- assert ! ( !check_ignore( & config, "// needs-profiler-support" ) ) ;
369+ assert ! ( !check_ignore( & config, "//@ needs-profiler-support" ) ) ;
370370}
371371
372372#[ test]
@@ -382,21 +382,21 @@ fn asm_support() {
382382 for ( target, has_asm) in asms {
383383 let config = cfg ( ) . target ( target) . build ( ) ;
384384 assert_eq ! ( config. has_asm_support( ) , has_asm) ;
385- assert_eq ! ( check_ignore( & config, "// needs-asm-support" ) , !has_asm)
385+ assert_eq ! ( check_ignore( & config, "//@ needs-asm-support" ) , !has_asm)
386386 }
387387}
388388
389389#[ test]
390390fn channel ( ) {
391391 let config: Config = cfg ( ) . channel ( "beta" ) . build ( ) ;
392392
393- assert ! ( check_ignore( & config, "// ignore-beta" ) ) ;
394- assert ! ( check_ignore( & config, "// only-nightly" ) ) ;
395- assert ! ( check_ignore( & config, "// only-stable" ) ) ;
393+ assert ! ( check_ignore( & config, "//@ ignore-beta" ) ) ;
394+ assert ! ( check_ignore( & config, "//@ only-nightly" ) ) ;
395+ assert ! ( check_ignore( & config, "//@ only-stable" ) ) ;
396396
397- assert ! ( !check_ignore( & config, "// only-beta" ) ) ;
398- assert ! ( !check_ignore( & config, "// ignore-nightly" ) ) ;
399- assert ! ( !check_ignore( & config, "// ignore-stable" ) ) ;
397+ assert ! ( !check_ignore( & config, "//@ only-beta" ) ) ;
398+ assert ! ( !check_ignore( & config, "//@ ignore-nightly" ) ) ;
399+ assert ! ( !check_ignore( & config, "//@ ignore-stable" ) ) ;
400400}
401401
402402#[ test]
@@ -418,7 +418,7 @@ fn test_extract_version_range() {
418418#[ should_panic( expected = "Duplicate revision: `rpass1` in line ` rpass1 rpass1`" ) ]
419419fn test_duplicate_revisions ( ) {
420420 let config: Config = cfg ( ) . build ( ) ;
421- parse_rs ( & config, "// revisions: rpass1 rpass1" ) ;
421+ parse_rs ( & config, "//@ revisions: rpass1 rpass1" ) ;
422422}
423423
424424#[ test]
@@ -432,7 +432,7 @@ fn ignore_arch() {
432432 for ( target, arch) in archs {
433433 let config: Config = cfg ( ) . target ( target) . build ( ) ;
434434 assert ! ( config. matches_arch( arch) , "{target} {arch}" ) ;
435- assert ! ( check_ignore( & config, & format!( "// ignore-{arch}" ) ) ) ;
435+ assert ! ( check_ignore( & config, & format!( "//@ ignore-{arch}" ) ) ) ;
436436 }
437437}
438438
@@ -447,7 +447,7 @@ fn matches_os() {
447447 for ( target, os) in oss {
448448 let config = cfg ( ) . target ( target) . build ( ) ;
449449 assert ! ( config. matches_os( os) , "{target} {os}" ) ;
450- assert ! ( check_ignore( & config, & format!( "// ignore-{os}" ) ) ) ;
450+ assert ! ( check_ignore( & config, & format!( "//@ ignore-{os}" ) ) ) ;
451451 }
452452}
453453
@@ -461,7 +461,7 @@ fn matches_env() {
461461 for ( target, env) in envs {
462462 let config: Config = cfg ( ) . target ( target) . build ( ) ;
463463 assert ! ( config. matches_env( env) , "{target} {env}" ) ;
464- assert ! ( check_ignore( & config, & format!( "// ignore-{env}" ) ) ) ;
464+ assert ! ( check_ignore( & config, & format!( "//@ ignore-{env}" ) ) ) ;
465465 }
466466}
467467
@@ -475,7 +475,7 @@ fn matches_abi() {
475475 for ( target, abi) in abis {
476476 let config: Config = cfg ( ) . target ( target) . build ( ) ;
477477 assert ! ( config. matches_abi( abi) , "{target} {abi}" ) ;
478- assert ! ( check_ignore( & config, & format!( "// ignore-{abi}" ) ) ) ;
478+ assert ! ( check_ignore( & config, & format!( "//@ ignore-{abi}" ) ) ) ;
479479 }
480480}
481481
@@ -491,7 +491,7 @@ fn is_big_endian() {
491491 for ( target, is_big) in endians {
492492 let config = cfg ( ) . target ( target) . build ( ) ;
493493 assert_eq ! ( config. is_big_endian( ) , is_big, "{target} {is_big}" ) ;
494- assert_eq ! ( check_ignore( & config, "// ignore-endian-big" ) , is_big) ;
494+ assert_eq ! ( check_ignore( & config, "//@ ignore-endian-big" ) , is_big) ;
495495 }
496496}
497497
@@ -506,9 +506,9 @@ fn pointer_width() {
506506 for ( target, width) in widths {
507507 let config: Config = cfg ( ) . target ( target) . build ( ) ;
508508 assert_eq ! ( config. get_pointer_width( ) , width, "{target} {width}" ) ;
509- assert_eq ! ( check_ignore( & config, "// ignore-16bit" ) , width == 16 ) ;
510- assert_eq ! ( check_ignore( & config, "// ignore-32bit" ) , width == 32 ) ;
511- assert_eq ! ( check_ignore( & config, "// ignore-64bit" ) , width == 64 ) ;
509+ assert_eq ! ( check_ignore( & config, "//@ ignore-16bit" ) , width == 16 ) ;
510+ assert_eq ! ( check_ignore( & config, "//@ ignore-32bit" ) , width == 32 ) ;
511+ assert_eq ! ( check_ignore( & config, "//@ ignore-64bit" ) , width == 64 ) ;
512512 }
513513}
514514
@@ -534,7 +534,7 @@ fn wasm_special() {
534534 for ( target, pattern, ignore) in ignores {
535535 let config: Config = cfg ( ) . target ( target) . build ( ) ;
536536 assert_eq ! (
537- check_ignore( & config, & format!( "// ignore-{pattern}" ) ) ,
537+ check_ignore( & config, & format!( "//@ ignore-{pattern}" ) ) ,
538538 ignore,
539539 "{target} {pattern}"
540540 ) ;
@@ -555,8 +555,8 @@ fn families() {
555555 assert ! ( config. matches_family( family) ) ;
556556 let other = if family == "windows" { "unix" } else { "windows" } ;
557557 assert ! ( !config. matches_family( other) ) ;
558- assert ! ( check_ignore( & config, & format!( "// ignore-{family}" ) ) ) ;
559- assert ! ( !check_ignore( & config, & format!( "// ignore-{other}" ) ) ) ;
558+ assert ! ( check_ignore( & config, & format!( "//@ ignore-{family}" ) ) ) ;
559+ assert ! ( !check_ignore( & config, & format!( "//@ ignore-{other}" ) ) ) ;
560560 }
561561}
562562
@@ -566,10 +566,17 @@ fn ignore_mode() {
566566 // Indicate profiler support so that "coverage-run" tests aren't skipped.
567567 let config: Config = cfg ( ) . mode ( mode) . profiler_support ( true ) . build ( ) ;
568568 let other = if mode == "coverage-run" { "coverage-map" } else { "coverage-run" } ;
569+
569570 assert_ne ! ( mode, other) ;
570571 assert_eq ! ( config. mode, Mode :: from_str( mode) . unwrap( ) ) ;
571572 assert_ne ! ( config. mode, Mode :: from_str( other) . unwrap( ) ) ;
572- assert ! ( check_ignore( & config, & format!( "// ignore-mode-{mode}" ) ) ) ;
573- assert ! ( !check_ignore( & config, & format!( "// ignore-mode-{other}" ) ) ) ;
573+
574+ if mode == "ui" {
575+ assert ! ( check_ignore( & config, & format!( "//@ ignore-mode-{mode}" ) ) ) ;
576+ assert ! ( !check_ignore( & config, & format!( "//@ ignore-mode-{other}" ) ) ) ;
577+ } else {
578+ assert ! ( check_ignore( & config, & format!( "// ignore-mode-{mode}" ) ) ) ;
579+ assert ! ( !check_ignore( & config, & format!( "// ignore-mode-{other}" ) ) ) ;
580+ }
574581 }
575582}
0 commit comments