@@ -144,9 +144,6 @@ foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3
144
144
) ;
145
145
}
146
146
147
- // Temporarily disable this test until --all-targets is fixed when using
148
- // `panic`. See https://github.com/rust-lang/cargo/issues/5444
149
- #[ ignore]
150
147
#[ test]
151
148
fn profile_selection_build_all_targets ( ) {
152
149
let p = all_target_project ( ) ;
@@ -224,9 +221,6 @@ foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
224
221
) ;
225
222
}
226
223
227
- // Temporarily disable this test until --all-targets is fixed when using
228
- // `panic`. See https://github.com/rust-lang/cargo/issues/5444
229
- #[ ignore]
230
224
#[ test]
231
225
fn profile_selection_build_all_targets_release ( ) {
232
226
let p = all_target_project ( ) ;
@@ -315,12 +309,13 @@ fn profile_selection_test() {
315
309
// - foo target list is:
316
310
// Target Profile Mode
317
311
// ------ ------- ----
318
- // lib dev-panic build
312
+ // lib dev-panic build (for tests)
313
+ // lib dev build (for bins)
319
314
// lib test test
320
315
// test test test
321
316
// example dev-panic build
322
317
// bin test test
323
- // bin dev-panic build
318
+ // bin dev build
324
319
//
325
320
assert_that ( p. cargo ( "test -vv" ) , execs ( ) . with_status ( 0 ) . with_stderr_unordered ( "\
326
321
[COMPILING] bar [..]
@@ -332,16 +327,17 @@ fn profile_selection_test() {
332
327
[RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..]
333
328
[RUNNING] `[..][/]target[/]debug[/]build[/]foo-[..][/]build-script-build`
334
329
foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
330
+ [RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..]
335
331
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..]
336
332
[RUNNING] `rustc --crate-name foo src[/]lib.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..]
337
333
[RUNNING] `rustc --crate-name test1 tests[/]test1.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..]
338
334
[RUNNING] `rustc --crate-name ex1 examples[/]ex1.rs --crate-type bin --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..]
339
335
[RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..]
340
- [RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..]
336
+ [RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..]
341
337
[FINISHED] dev [unoptimized + debuginfo] [..]
342
- [RUNNING] `[..]foo[..]`
343
- [RUNNING] `[..]foo[..]`
344
- [RUNNING] `[..]test1[..]`
338
+ [RUNNING] `[..][/]deps[/] foo- [..]`
339
+ [RUNNING] `[..][/]deps[/] foo- [..]`
340
+ [RUNNING] `[..][/]deps[/] test1- [..]`
345
341
[DOCTEST] foo
346
342
[RUNNING] `rustdoc --test [..]
347
343
" ) ) ;
@@ -353,9 +349,9 @@ foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
353
349
[FRESH] bdep [..]
354
350
[FRESH] foo [..]
355
351
[FINISHED] dev [unoptimized + debuginfo] [..]
356
- [RUNNING] `[..]foo[..]`
357
- [RUNNING] `[..]foo[..]`
358
- [RUNNING] `[..]test1[..]`
352
+ [RUNNING] `[..][/]deps[/] foo- [..]`
353
+ [RUNNING] `[..][/]deps[/] foo- [..]`
354
+ [RUNNING] `[..][/]deps[/] test1- [..]`
359
355
[DOCTEST] foo
360
356
[RUNNING] `rustdoc --test [..]
361
357
" ,
@@ -381,12 +377,13 @@ fn profile_selection_test_release() {
381
377
// - foo target list is:
382
378
// Target Profile Mode
383
379
// ------ ------- ----
384
- // lib release-panic build
380
+ // lib release-panic build (for tests)
381
+ // lib release build (for bins)
385
382
// lib bench test
386
383
// test bench test
387
384
// example release-panic build
388
385
// bin bench test
389
- // bin release-panic build
386
+ // bin release build
390
387
//
391
388
assert_that ( p. cargo ( "test --release -vv" ) , execs ( ) . with_status ( 0 ) . with_stderr_unordered ( "\
392
389
[COMPILING] bar [..]
@@ -398,16 +395,17 @@ fn profile_selection_test_release() {
398
395
[RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..]
399
396
[RUNNING] `[..][/]target[/]release[/]build[/]foo-[..][/]build-script-build`
400
397
foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3
398
+ [RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..]
401
399
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..]
402
400
[RUNNING] `rustc --crate-name foo src[/]lib.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]
403
401
[RUNNING] `rustc --crate-name test1 tests[/]test1.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]
404
402
[RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]
405
403
[RUNNING] `rustc --crate-name ex1 examples[/]ex1.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..]
406
- [RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..]
404
+ [RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..]
407
405
[FINISHED] release [optimized] [..]
408
- [RUNNING] `[..]foo[..]`
409
- [RUNNING] `[..]foo[..]`
410
- [RUNNING] `[..]test1[..]`
406
+ [RUNNING] `[..][/]deps[/] foo- [..]`
407
+ [RUNNING] `[..][/]deps[/] foo- [..]`
408
+ [RUNNING] `[..][/]deps[/] test1- [..]`
411
409
[DOCTEST] foo
412
410
[RUNNING] `rustdoc --test [..]`
413
411
" ) ) ;
@@ -419,9 +417,9 @@ foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3
419
417
[FRESH] bdep [..]
420
418
[FRESH] foo [..]
421
419
[FINISHED] release [optimized] [..]
422
- [RUNNING] `[..]foo[..]`
423
- [RUNNING] `[..]foo[..]`
424
- [RUNNING] `[..]test1[..]`
420
+ [RUNNING] `[..][/]deps[/] foo- [..]`
421
+ [RUNNING] `[..][/]deps[/] foo- [..]`
422
+ [RUNNING] `[..][/]deps[/] test1- [..]`
425
423
[DOCTEST] foo
426
424
[RUNNING] `rustdoc --test [..]
427
425
" ,
@@ -448,11 +446,12 @@ fn profile_selection_bench() {
448
446
// - foo target list is:
449
447
// Target Profile Mode
450
448
// ------ ------- ----
451
- // lib release-panic build
449
+ // lib release-panic build (for benches)
450
+ // lib release build (for bins)
452
451
// lib bench test(bench)
453
452
// bench bench test(bench)
454
453
// bin bench test(bench)
455
- // bin release-panic build
454
+ // bin release build
456
455
//
457
456
assert_that ( p. cargo ( "bench -vv" ) , execs ( ) . with_status ( 0 ) . with_stderr_unordered ( "\
458
457
[COMPILING] bar [..]
@@ -464,15 +463,16 @@ fn profile_selection_bench() {
464
463
[RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..]
465
464
[RUNNING] `[..]target[/]release[/]build[/]foo-[..][/]build-script-build`
466
465
foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3
466
+ [RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..]
467
467
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..]
468
468
[RUNNING] `rustc --crate-name foo src[/]lib.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]
469
469
[RUNNING] `rustc --crate-name bench1 benches[/]bench1.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]
470
470
[RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]
471
- [RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..]
471
+ [RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..]
472
472
[FINISHED] release [optimized] [..]
473
- [RUNNING] `[..]foo[..] --bench`
474
- [RUNNING] `[..]foo[..] --bench`
475
- [RUNNING] `[..]bench1[..] --bench`
473
+ [RUNNING] `[..][/]deps[/] foo- [..] --bench`
474
+ [RUNNING] `[..][/]deps[/] foo- [..] --bench`
475
+ [RUNNING] `[..][/]deps[/] bench1- [..] --bench`
476
476
" ) ) ;
477
477
assert_that (
478
478
p. cargo ( "bench -vv" ) ,
@@ -482,9 +482,9 @@ foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3
482
482
[FRESH] bdep [..]
483
483
[FRESH] foo [..]
484
484
[FINISHED] release [optimized] [..]
485
- [RUNNING] `[..]foo[..] --bench`
486
- [RUNNING] `[..]foo[..] --bench`
487
- [RUNNING] `[..]bench1[..] --bench`
485
+ [RUNNING] `[..][/]deps[/] foo- [..] --bench`
486
+ [RUNNING] `[..][/]deps[/] foo- [..] --bench`
487
+ [RUNNING] `[..][/]deps[/] bench1- [..] --bench`
488
488
" ,
489
489
) ,
490
490
) ;
0 commit comments