Merge pull request #1154 from oli-obk/no_dogfood_for_travis

don't run clippy on itself twice in travis
This commit is contained in:
Manish Goregaokar 2016-08-08 21:48:29 +05:30 committed by GitHub
commit 4b8f6a0b0f
2 changed files with 13 additions and 7 deletions

View File

@ -1,7 +1,11 @@
language: rust
rust: nightly
sudo: false
cache: cargo
cache:
cargo: true
directories:
- clippy_lints/target
env:
global:

View File

@ -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;