Skip to content

Commit bbbc973

Browse files
committed
Auto merge of #5864 - rust-lang:ci_debug, r=Manishearth
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
2 parents 2e0f8b6 + 0e44ed5 commit bbbc973

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/compile-test.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use compiletest_rs as compiletest;
44
use compiletest_rs::common::Mode as TestMode;
55

6-
use std::env::{self, set_var};
6+
use std::env::{self, set_var, var};
77
use std::ffi::OsStr;
88
use std::fs;
99
use std::io;
@@ -136,7 +136,9 @@ fn run_ui_toml(config: &mut compiletest::Config) {
136136

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

139+
let manifest_dir = var("CARGO_MANIFEST_DIR").unwrap_or_default();
139140
let res = run_tests(&config, tests);
141+
set_var("CARGO_MANIFEST_DIR", &manifest_dir);
140142
match res {
141143
Ok(true) => {},
142144
Ok(false) => panic!("Some tests failed"),

0 commit comments

Comments
 (0)