Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components tests are not run with cargo test at the root of foxbox #449

Open
fabricedesre opened this issue May 1, 2016 · 3 comments
Open

Comments

@fabricedesre
Copy link
Collaborator

STR:

  • Make a basic change to make a test invalid eg. in components/taxonomy/src/tag_storage.rs tests.
  • run cargo test

Expected:

  • test failure

Observed:

  • We only run the 71 tests of the main crate.

That's been the case since the components reorganization. That's... not great.

ping @JohanLorenzo & @julienw

@JohanLorenzo
Copy link
Contributor

JohanLorenzo commented May 2, 2016

I don't see a simple way to run every tests with cargo run 😞

I didn't call it explicitly when I merged the first component, but I added a script that runs every test in every component. This script is executed by Travis at each commit.

Worst case scenario, if someone would like to run the tests in taxonomy, s/he can also cd into the subcrate and cargo test.

Finally, we can customize the test target. However if we did so, we have to list every single file that contains a test. That doesn't seem a smart way to go.

Thenceforth, I'd recommend to stick with execute-all-rust-tests.sh, (and maybe to merge it with run.sh), and wait until cargo has a better support of multi-crates projects. What do you think?

@fabricedesre
Copy link
Collaborator Author

I think that departing from cargo test running all the project tests while cargo build does what's expected is confusing. At least this needs to be in the readme (but it currently says cargo test), but I'm more and more inclined to think that we'll need something like mach.

@JohanLorenzo
Copy link
Contributor

That makes sense. We should be consistent across all cargo commands. I also believe a build system like mach would help in reaching that consistency. That's what servo uses, for instance.

@JohanLorenzo JohanLorenzo changed the title components tests are not run Components tests are not run with cargo test at the root of foxbox May 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants