Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android: use cargo test instead of nextest #4801

Merged
merged 11 commits into from
May 1, 2023
9 changes: 4 additions & 5 deletions util/android-commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ run_termux_command() {
local retries=${retries:-3}
local sleep_interval=${sleep_interval:-5}
try_fix=3
echo "run_termux_command with timeout=$timeout / retries=$retries / sleep_interval=$sleep_interval"
while ! adb shell "ls $probe" 2>/dev/null; do
echo -n "Waiting for $probe: "

Expand Down Expand Up @@ -209,7 +210,7 @@ snapshot() {
# We need to install nextest via cargo currently, since there is no pre-built binary for android x86
command="'\
export CARGO_TERM_COLOR=always; \
cargo install cargo-nextest; \
#cargo install cargo-nextest; \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the rest of this block still necessary? It might also be useful to add a hint why it is commented out.

echo \$? > $probe'"
run_termux_command "$command" "$probe"
return_code=$?
Expand All @@ -224,7 +225,7 @@ pwd; \
command -v rustc && rustc -Vv; \
ls -la ~/.cargo/bin; \
cargo --list; \
cargo nextest --version; \
#cargo nextest --version; \
touch $probe'"
run_termux_command "$command" "$probe"

Expand Down Expand Up @@ -328,9 +329,7 @@ tests() {
export RUST_BACKTRACE=1; \
export CARGO_TERM_COLOR=always; \
export CARGO_INCREMENTAL=0; \
cd ~/coreutils; \
timeout --preserve-status --verbose -k 1m 60m \
cargo nextest run --profile ci --hide-progress-bar --features feat_os_unix_android; \
cd ~/coreutils && cargo test --features feat_os_unix_android; \
echo \$? >$probe'"
run_termux_command "$command" "$probe" || return

Expand Down