don't run clippy on itself twice in travis

This commit is contained in:
Oliver Schneider 2016-08-08 17:33:41 +02:00
parent ac5abcf593
commit dec3250ad6
No known key found for this signature in database
GPG Key ID: 56D6EEA0FC67AC46

View File

@ -5,12 +5,19 @@
extern crate compiletest_rs as compiletest; extern crate compiletest_rs as compiletest;
extern crate test; extern crate test;
use std::env::{var, set_var, temp_dir}; use std::env::{var, set_var};
use std::path::PathBuf; use std::path::PathBuf;
use test::TestPaths; use test::TestPaths;
#[test] #[test]
fn dogfood() { 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 mut config = compiletest::default_config();
let cfg_mode = "run-fail".parse().expect("Invalid mode"); let cfg_mode = "run-fail".parse().expect("Invalid mode");
@ -23,11 +30,6 @@ fn dogfood() {
config.filter = Some(name.to_owned()) 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.mode = cfg_mode;
config.verbose = true; config.verbose = true;