diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-10-31 15:37:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-31 15:37:35 -0500 |
commit | 4ab18e6bc3bd91af27551af031340818316fa0fc (patch) | |
tree | 2d654c6e65f91f722c9ffcde4ace3ca82f7a881f | |
parent | 41b9f697ee43feb4602ec251f24f489ead29dcfd (diff) | |
parent | bc99e3feb16defcaaca8d456f0693f947929c1fa (diff) |
Auto merge of #176 - fitzgen:release-tests, r=emilio
Run tests on release builds
This makes `cargo test` test the appropriate release/debug bindgen binary and extends Travis CI testing to also test release builds.
r? @emilio
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | tests/tests.rs | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index 031c61ff..5d3395e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,6 +41,8 @@ before_script: script: - cargo build --verbose --features llvm_stable - cargo test --features llvm_stable + - cargo build --release --verbose --features llvm_stable + - cargo test --release --features llvm_stable - git add -A - git diff @ - git diff-index --quiet HEAD diff --git a/tests/tests.rs b/tests/tests.rs index 4cecc2c2..addaa5ad 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -64,7 +64,11 @@ fn run_bindgen_tests() { let mut bindgen = PathBuf::from(&crate_root); bindgen.push("target"); - bindgen.push("debug"); + if cfg!(debug_assertions) { + bindgen.push("debug"); + } else { + bindgen.push("release"); + } bindgen.push("bindgen"); if !bindgen.is_file() { panic!("{} is not a file! Build bindgen before running tests.", |