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:
commit
4b8f6a0b0f
@ -1,7 +1,11 @@
|
||||
language: rust
|
||||
rust: nightly
|
||||
sudo: false
|
||||
cache: cargo
|
||||
|
||||
cache:
|
||||
cargo: true
|
||||
directories:
|
||||
- clippy_lints/target
|
||||
|
||||
env:
|
||||
global:
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user