@@ -10,10 +10,9 @@ use std::process::Command;
10
10
11
11
use remove_dir_all:: remove_dir_all;
12
12
13
- use rustup:: for_host;
14
13
use rustup:: test:: { this_host_triple, with_saved_path} ;
15
14
use rustup:: utils:: { raw, utils} ;
16
- use rustup:: Notification ;
15
+ use rustup:: { for_host , Notification , DUP_TOOLS , TOOLS } ;
17
16
18
17
use crate :: mock:: clitools:: {
19
18
self , expect_component_executable, expect_component_not_executable, expect_err, expect_err_ex,
@@ -54,7 +53,7 @@ fn setup_installed(f: &dyn Fn(&Config)) {
54
53
}
55
54
56
55
#[ test]
57
- /// This is the primary smoke test testing the full end to end behaviour of the
56
+ /// This is the primary smoke test testing the full end to end behavior of the
58
57
/// installation code path: everything that is output, the proxy installation,
59
58
/// status of the proxies.
60
59
fn install_bins_to_cargo_home ( ) {
@@ -84,17 +83,6 @@ info: default toolchain set to 'stable-{0}'
84
83
"
85
84
) ,
86
85
) ;
87
- let rustup = config. cargodir . join ( & format ! ( "bin/rustup{}" , EXE_SUFFIX ) ) ;
88
- let rustc = config. cargodir . join ( & format ! ( "bin/rustc{}" , EXE_SUFFIX ) ) ;
89
- let rustdoc = config. cargodir . join ( & format ! ( "bin/rustdoc{}" , EXE_SUFFIX ) ) ;
90
- let cargo = config. cargodir . join ( & format ! ( "bin/cargo{}" , EXE_SUFFIX ) ) ;
91
- let rust_lldb = config
92
- . cargodir
93
- . join ( & format ! ( "bin/rust-lldb{}" , EXE_SUFFIX ) ) ;
94
- let rust_gdb = config. cargodir . join ( & format ! ( "bin/rust-gdb{}" , EXE_SUFFIX ) ) ;
95
- let rust_gdbgui = config
96
- . cargodir
97
- . join ( & format ! ( "bin/rust-gdbgui{}" , EXE_SUFFIX ) ) ;
98
86
#[ cfg( windows) ]
99
87
fn check ( path : & Path ) {
100
88
assert ! ( path. exists( ) ) ;
@@ -108,13 +96,11 @@ info: default toolchain set to 'stable-{0}'
108
96
}
109
97
assert ! ( is_exe( path) ) ;
110
98
}
111
- check ( & rustup) ;
112
- check ( & rustc) ;
113
- check ( & rustdoc) ;
114
- check ( & cargo) ;
115
- check ( & rust_lldb) ;
116
- check ( & rust_gdb) ;
117
- check ( & rust_gdbgui) ;
99
+
100
+ for tool in TOOLS . iter ( ) . chain ( DUP_TOOLS . iter ( ) ) {
101
+ let path = & config. cargodir . join ( & format ! ( "bin/{}{}" , tool, EXE_SUFFIX ) ) ;
102
+ check ( path) ;
103
+ }
118
104
} )
119
105
} ) ;
120
106
}
0 commit comments