Closed
Description
cargo test
takes a long time with because the first run of main_binary
takes a long time while holding the cargo
locking, blocking other tests
Example
running 6 tests
test blackbox_backup ... test blackbox_backup has been running for over 60 seconds
test blackbox_help ... test blackbox_help has been running for over 60 seconds
test blackbox_help ... ok
test blackbox_no_args ... ok
test clean_error_on_non_archive ... ok
test empty_archive ... ok
test incomplete_version ... ok
test blackbox_backup ... ok
From https://ci.appveyor.com/project/sourcefrog/conserve/builds/20036005
Cause
- If a bare
cargo test
is run,cargo
usestarget/debug
for theOUT_DIR
main_binary
passes--target <TRIPLET>
tocargo
which changes theOUT_DIR
totarget/<TRIPLE>/debug
- This means
cargo test
s build artifacts cannot be reused and those parts need to be rebuilt
- This means
Background:
In Issue #4 we had to choose between performance and correctness (if you do specify --target
, main_binary
should run that target's bin
) and sided on correctness
Workarounds
-
Call into escargot without passing in
current_target
-
Call
cargo test --target <TRIPLE>