-
Notifications
You must be signed in to change notification settings - Fork 743
Speed up integration tests (move building expectations) #216
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
Speed up integration tests (move building expectations) #216
Conversation
This looks good, but needs documentation, and being added to CI. |
Speed up running 'cargo test': -Before: 2'17s -After: 30s Update to use new path: Makefile, .travis.yml, CONTRIBUTING.md, tests/tests.rs Delete unused expectation that fail to compile: tests/expectations/moar_bitfields.rs tests/expectations/variadic_template_args.rs For every 'cargo test' run, the bindgen output where built. We already test that the bindgen output match expectations/*.rs, so there is no need to check it build unless the expectation is updated. Move tests/expectations/*.rs to tests/expectations/tests/*.rs and make tests/expectations a new dev-dependency package. This allow running: - cargo test -p tests_expectations In addition to the speed up, we also get a clean output for the build and test run. In particular, a number of warnings are generated that should probably be silenced, and eventually enforced modifying travis to build: - RUSTFLAGS='-D warnings' cargo test -p tests_expectations The benefit of having it as a new package is that it avoid polluting the 'cargo test' output that should focus on bindgen.
497ae94
to
2866ab5
Compare
Thank you very much for your review. I've updated all the places I found that mentioned expectations. |
@bors-servo r+ Looks good, thanks! |
📌 Commit 2866ab5 has been approved by |
Speed up integration tests (move building expectations) Speed up running 'cargo test': -Before: 2'17s -After: 30s Update to use new path: Makefile, .travis.yml, CONTRIBUTING.md, tests/tests.rs Delete unused expectation that fail to compile: tests/expectations/moar_bitfields.rs tests/expectations/variadic_template_args.rs
☀️ Test successful - status-travis |
Hmm, I'm working on #204, and having trouble running these tests on Windows. I've made sure Rust's https://gist.github.com/jdub/66752599b85d73b15d12a7d7fd985959 Works fine on Linux. And this is a cool change! |
Hello,
Is it different when using Does the link error occurs as well when you do:
|
Yeah, same error. Don't worry too much -- none of this was expected to work on Windows, and it's almost certainly an installation problem. Thanks. btw, between your changes and mine, we've reduced test suite time (excluding build) on my machine from about 21s to 2s. 😆 😆 😆
|
I bet it's not an installation problem, but that rustc may not be performing dead code elimination, which is what could cause those linker errors. EDIT: gcc which is the linker you're using, not rustc directly, of course. |
Speed up running 'cargo test':
-Before: 2'17s
-After: 30s
Update to use new path:
Makefile, .travis.yml, CONTRIBUTING.md, tests/tests.rs
Delete unused expectation that fail to compile:
tests/expectations/moar_bitfields.rs
tests/expectations/variadic_template_args.rs