File tree 1 file changed +3
-9
lines changed
1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ fn base_config(test_dir: &str) -> compiletest::Config {
31
31
} ,
32
32
dependencies_crate_manifest_path : Some ( "clippy_test_deps/Cargo.toml" . into ( ) ) ,
33
33
target : None ,
34
- out_dir : " target/ui_test ". into ( ) ,
34
+ out_dir : PathBuf :: from ( std :: env :: var_os ( "CARGO_TARGET_DIR" ) . unwrap_or ( " target". into ( ) ) ) . join ( "ui_test" ) ,
35
35
..compiletest:: Config :: rustc ( Path :: new ( "tests" ) . join ( test_dir) )
36
36
} ;
37
37
@@ -116,10 +116,7 @@ fn run_ui_toml() {
116
116
117
117
config. stderr_filter (
118
118
& regex:: escape (
119
- & std:: path:: Path :: new ( file ! ( ) )
120
- . parent ( )
121
- . unwrap ( )
122
- . canonicalize ( )
119
+ & fs:: canonicalize ( "tests" )
123
120
. unwrap ( )
124
121
. parent ( )
125
122
. unwrap ( )
@@ -175,10 +172,7 @@ fn run_ui_cargo() {
175
172
176
173
config. stderr_filter (
177
174
& regex:: escape (
178
- & std:: path:: Path :: new ( file ! ( ) )
179
- . parent ( )
180
- . unwrap ( )
181
- . canonicalize ( )
175
+ & fs:: canonicalize ( "tests" )
182
176
. unwrap ( )
183
177
. parent ( )
184
178
. unwrap ( )
You can’t perform that action at this time.
0 commit comments