Skip to content

Commit 4b8f6a0

Browse files
authored
Merge pull request #1154 from oli-obk/no_dogfood_for_travis
don't run clippy on itself twice in travis
2 parents 610615b + afc95a1 commit 4b8f6a0

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
language: rust
22
rust: nightly
33
sudo: false
4-
cache: cargo
4+
5+
cache:
6+
cargo: true
7+
directories:
8+
- clippy_lints/target
59

610
env:
711
global:

tests/dogfood.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,19 @@
55
extern crate compiletest_rs as compiletest;
66
extern crate test;
77

8-
use std::env::{var, set_var, temp_dir};
8+
use std::env::{var, set_var};
99
use std::path::PathBuf;
1010
use test::TestPaths;
1111

1212
#[test]
1313
fn dogfood() {
14+
// don't run dogfood on travis, cargo-clippy already runs clippy on itself
15+
if let Ok(travis) = var("TRAVIS") {
16+
if travis == "true" {
17+
return;
18+
}
19+
}
20+
1421
let mut config = compiletest::default_config();
1522

1623
let cfg_mode = "run-fail".parse().expect("Invalid mode");
@@ -23,11 +30,6 @@ fn dogfood() {
2330
config.filter = Some(name.to_owned())
2431
}
2532

26-
if cfg!(windows) {
27-
// work around https://github.com/laumann/compiletest-rs/issues/35 on msvc windows
28-
config.build_base = temp_dir();
29-
}
30-
3133
config.mode = cfg_mode;
3234
config.verbose = true;
3335

0 commit comments

Comments
 (0)