From dec3250ad6deff19431d77a426ef2b8be0266300 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 8 Aug 2016 17:33:41 +0200 Subject: [PATCH 1/3] don't run clippy on itself twice in travis --- tests/dogfood.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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; From 9207c44bd2425ee4a539f480cc993b4fe9e2ec67 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 8 Aug 2016 17:45:54 +0200 Subject: [PATCH 2/3] also cache files in clippy_lints, necessary for testing cargo-clippy --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6c35f2a91e4..5453c43b1e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,10 @@ language: rust rust: nightly sudo: false -cache: cargo +cache: + cargo: true + directories: + - clippy_lints/target env: global: From afc95a11ec922a23d785a5e67d44d4c954f8da6d Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 8 Aug 2016 17:53:07 +0200 Subject: [PATCH 3/3] travis bump --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 5453c43b1e2..056b300f36b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: rust rust: nightly sudo: false + cache: cargo: true directories: