Skip to content

Commit

Permalink
Auto merge of rust-lang#5864 - rust-lang:ci_debug, r=Manishearth
Browse files Browse the repository at this point in the history
Fix ui-cargo tests in CI

r? @ebroto

The `ui-toml` tests set the `CARGO_MANIFEST_DIR` var, but never reset it, so the `ui-cargo` tests used it also and then found a faulty `clippy.toml` file

changelog: none
  • Loading branch information
bors committed Aug 3, 2020
2 parents 2e0f8b6 + 0e44ed5 commit bbbc973
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/compile-test.rs
Expand Up @@ -3,7 +3,7 @@
use compiletest_rs as compiletest;
use compiletest_rs::common::Mode as TestMode;

use std::env::{self, set_var};
use std::env::{self, set_var, var};
use std::ffi::OsStr;
use std::fs;
use std::io;
Expand Down Expand Up @@ -136,7 +136,9 @@ fn run_ui_toml(config: &mut compiletest::Config) {

let tests = compiletest::make_tests(&config);

let manifest_dir = var("CARGO_MANIFEST_DIR").unwrap_or_default();
let res = run_tests(&config, tests);
set_var("CARGO_MANIFEST_DIR", &manifest_dir);
match res {
Ok(true) => {},
Ok(false) => panic!("Some tests failed"),
Expand Down

0 comments on commit bbbc973

Please sign in to comment.