Skip to content

Commit 5a9b7a0

Browse files
rbtcollinsDarunada
authored andcommitted
Run integration tests as a single binary
Much of our test time is linking each test; a single bonanza binary lets us maintain tests individually, but amortize build/link costs effectively.
1 parent ffc6411 commit 5a9b7a0

File tree

64 files changed

+36
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+36
-61
lines changed

ci/run.bash

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,17 @@ build_test() {
6161
cmd="$1"
6262
shift
6363
download_pkg_test "${cmd}"
64-
target_cargo "${cmd}" --bin rustup-init
65-
target_cargo "${cmd}" --lib --all
66-
if [ "build" != "${cmd}" ]; then
67-
target_cargo "${cmd}" --doc --all
68-
fi
69-
70-
if [ "build" = "${cmd}" ]; then
71-
target_cargo "${cmd}" --test dist
64+
if [ "build" = "${cmd}" ]; then
65+
target_cargo "${cmd}" --workspace --all-targets
7266
else
7367
# free runners have 2 or 3(mac) cores
74-
target_cargo "${cmd}" --test dist -- --test-threads 2
68+
target_cargo "${cmd}" --workspace --tests -- --test-threads 2
69+
fi
70+
71+
if [ "build" != "${cmd}" ]; then
72+
target_cargo "${cmd}" --doc --workspace
7573
fi
7674

77-
find tests -maxdepth 1 -type f ! -path '*/dist.rs' -name '*.rs' \
78-
| sed -e 's@^tests/@@;s@\.rs$@@g' \
79-
| while read -r test; do
80-
target_cargo "${cmd}" --test "${test}"
81-
done
8275
}
8376

8477
if [ -z "$SKIP_TESTS" ]; then

tests/mock/clitools.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -806,24 +806,6 @@ where
806806
!(run || self_cmd || version || (is_update && !no_self_update))
807807
}
808808

809-
#[deprecated]
810-
pub fn run<I, A>(config: &Config, name: &str, args: I, env: &[(&str, &str)]) -> SanitizedOutput
811-
where
812-
I: IntoIterator<Item = A> + Clone,
813-
A: AsRef<OsStr>,
814-
{
815-
config.run(name, args, env)
816-
}
817-
818-
#[deprecated]
819-
pub fn run_subprocess<I, A>(config: &Config, name: &str, args: I, env: &[(&str, &str)]) -> Output
820-
where
821-
I: IntoIterator<Item = A>,
822-
A: AsRef<OsStr>,
823-
{
824-
config.run_subprocess(name, args, env)
825-
}
826-
827809
#[derive(Copy, Clone, Eq, PartialEq)]
828810
enum RlsStatus {
829811
Available,

0 commit comments

Comments
 (0)