File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,11 @@ fn host_libs() -> PathBuf {
27
27
}
28
28
}
29
29
30
+ #[ must_use]
31
+ fn target_libs ( ) -> Option < PathBuf > {
32
+ option_env ! ( "TARGET_LIBS" ) . map ( PathBuf :: from)
33
+ }
34
+
30
35
#[ must_use]
31
36
fn rustc_test_suite ( ) -> Option < PathBuf > {
32
37
option_env ! ( "RUSTC_TEST_SUITE" ) . map ( PathBuf :: from)
@@ -58,7 +63,14 @@ fn config(mode: &str, dir: PathBuf) -> compiletest::Config {
58
63
let needs_disambiguation = [ "serde" , "regex" , "clippy_lints" ] ;
59
64
// This assumes that deps are compiled (they are for Cargo integration tests).
60
65
let deps = std:: fs:: read_dir ( host_libs ( ) . join ( "deps" ) ) . unwrap ( ) ;
66
+ let deps: Vec < _ > = if let Some ( target_libs) = target_libs ( ) {
67
+ deps. chain ( std:: fs:: read_dir ( target_libs. join ( "deps" ) ) . unwrap ( ) )
68
+ . collect ( )
69
+ } else {
70
+ deps. collect ( )
71
+ } ;
61
72
let disambiguated = deps
73
+ . into_iter ( )
62
74
. filter_map ( |dep| {
63
75
let path = dep. ok ( ) ?. path ( ) ;
64
76
let name = path. file_name ( ) ?. to_string_lossy ( ) ;
You can’t perform that action at this time.
0 commit comments