-
Notifications
You must be signed in to change notification settings - Fork 117
Infer integration tests under tests/ #386
base: master
Are you sure you want to change the base?
Conversation
Tests are indeed detected, but
https://ci.appveyor.com/project/Ms2ger/rust-mozjs/build/1.0.485/job/vytvpct6tyxx96xa#L242 |
My suspicion is that when the tests are not declared in this way, they are run using multiple threads. |
Could wrap each test in a |
How would that help? |
So that we know that we only ever create a single |
@jdm explicitly stating test targets in Cargo.toml doesn't change the way they are built. The way Cargo works here is that it builds each integration test as a separate binary and runs |
Since this tests bindings to an external C library that has to guarantee that single Seems that executing with |
Have we verified that forcing one |
This is intermittent and I couldn't reproduce it locally myself. I might leave it to run longer and see if the parallel version doesn't encounter failures, but I'm not really experienced with SM and JSAPI, so I'm not really sure what is the expected environment in which SM is guaranteed to run 😢 |
☔ The latest upstream changes (presumably #382) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #430) made this pull request unmergeable. Please resolve the merge conflicts. |
When I executed the 'cargo test' command, I got an unexpected result. The tests in rooting.rs were skipped. Can this PR help me solve this problem? Running target/debug/deps/rooting-2ed6793bd8bb11f6
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out |
No idea. I've never seen that before. |
Maybe this is a bug of cargo. |
Doesn't Line 5 in 2afcfa4
effectively prune any code in this module unless you test with debugmozjs feature? I assume Cargo still collects that file and compiles it but there may be nothing for rustc's libtest to test/run anymore at that point.
|
Ah, yes. That is correct. |
Got it, thank you! |
By default Cargo treats tests/*.rs as integration tests, so there's no need to explicitly specify them in Cargo.toml.
This change is