diff --git a/.travis.yml b/.travis.yml index 031c61ff31..5d3395e592 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 003c0f1a02..5865168c5a 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.",