Pick up clippy.toml in ui-cargo tests.

This commit is contained in:
daxpedda 2021-02-06 17:57:31 +01:00
parent cd361a5e64
commit e2e33b4d35
No known key found for this signature in database
GPG Key ID: 43D62A3EA388E46F

View File

@ -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) => {},