Skip to content

Commit 499e582

Browse files
authored
Merge pull request #2965 from hi-rustin/rustin-patch-proxy
Test all proxies installed
2 parents b23f17c + c0144ea commit 499e582

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

tests/cli-self-upd.rs

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ use std::process::Command;
1010

1111
use remove_dir_all::remove_dir_all;
1212

13-
use rustup::for_host;
1413
use rustup::test::{this_host_triple, with_saved_path};
1514
use rustup::utils::{raw, utils};
16-
use rustup::Notification;
15+
use rustup::{for_host, Notification, DUP_TOOLS, TOOLS};
1716

1817
use crate::mock::clitools::{
1918
self, expect_component_executable, expect_component_not_executable, expect_err, expect_err_ex,
@@ -54,7 +53,7 @@ fn setup_installed(f: &dyn Fn(&Config)) {
5453
}
5554

5655
#[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
5857
/// installation code path: everything that is output, the proxy installation,
5958
/// status of the proxies.
6059
fn install_bins_to_cargo_home() {
@@ -84,17 +83,6 @@ info: default toolchain set to 'stable-{0}'
8483
"
8584
),
8685
);
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));
9886
#[cfg(windows)]
9987
fn check(path: &Path) {
10088
assert!(path.exists());
@@ -108,13 +96,11 @@ info: default toolchain set to 'stable-{0}'
10896
}
10997
assert!(is_exe(path));
11098
}
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+
}
118104
})
119105
});
120106
}

0 commit comments

Comments
 (0)