mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-31 09:04:18 +00:00
Pick up clippy.toml
in ui-cargo
tests.
This commit is contained in:
parent
cd361a5e64
commit
e2e33b4d35
@ -214,6 +214,7 @@ fn run_ui_cargo(config: &mut compiletest::Config) {
|
||||
Some("main.rs") => {},
|
||||
_ => continue,
|
||||
}
|
||||
set_var("CLIPPY_CONF_DIR", case.path());
|
||||
let paths = compiletest::common::TestPaths {
|
||||
file: file_path,
|
||||
base: config.src_base.clone(),
|
||||
@ -241,9 +242,11 @@ fn run_ui_cargo(config: &mut compiletest::Config) {
|
||||
let tests = compiletest::make_tests(&config);
|
||||
|
||||
let current_dir = env::current_dir().unwrap();
|
||||
let conf_dir = var("CLIPPY_CONF_DIR").unwrap_or_default();
|
||||
let filter = env::var("TESTNAME").ok();
|
||||
let res = run_tests(&config, &filter, tests);
|
||||
env::set_current_dir(current_dir).unwrap();
|
||||
set_var("CLIPPY_CONF_DIR", conf_dir);
|
||||
|
||||
match res {
|
||||
Ok(true) => {},
|
||||
|
Loading…
Reference in New Issue
Block a user