diff --git a/.travis.yml b/.travis.yml index 6c35f2a91e4..056b300f36b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,11 @@ language: rust rust: nightly sudo: false -cache: cargo + +cache: + cargo: true + directories: + - clippy_lints/target env: global: diff --git a/tests/dogfood.rs b/tests/dogfood.rs index c97be3f6e6f..3340e4986cd 100644 --- a/tests/dogfood.rs +++ b/tests/dogfood.rs @@ -5,12 +5,19 @@ extern crate compiletest_rs as compiletest; extern crate test; -use std::env::{var, set_var, temp_dir}; +use std::env::{var, set_var}; use std::path::PathBuf; use test::TestPaths; #[test] fn dogfood() { + // don't run dogfood on travis, cargo-clippy already runs clippy on itself + if let Ok(travis) = var("TRAVIS") { + if travis == "true" { + return; + } + } + let mut config = compiletest::default_config(); let cfg_mode = "run-fail".parse().expect("Invalid mode"); @@ -23,11 +30,6 @@ fn dogfood() { config.filter = Some(name.to_owned()) } - if cfg!(windows) { - // work around https://github.com/laumann/compiletest-rs/issues/35 on msvc windows - config.build_base = temp_dir(); - } - config.mode = cfg_mode; config.verbose = true;