mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #4801 from sylvestre/a
android: use cargo test instead of nextest
This commit is contained in:
commit
799897af79
5 changed files with 12 additions and 8 deletions
|
@ -538,6 +538,7 @@ fn test_invalid_arg() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(target_os = "android"))]
|
||||
fn test_mode_after_dash_dash() {
|
||||
let (at, ucmd) = at_and_ucmd!();
|
||||
run_single_test(
|
||||
|
@ -649,6 +650,7 @@ fn test_gnu_invalid_mode() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(target_os = "android"))]
|
||||
fn test_gnu_options() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
|
|
|
@ -257,6 +257,7 @@ fn test_cp_arg_interactive() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(target_os = "android"))]
|
||||
fn test_cp_arg_interactive_update() {
|
||||
// -u -i won't show the prompt to validate the override or not
|
||||
// Therefore, the error code will be 0
|
||||
|
@ -1542,7 +1543,7 @@ fn test_cp_reflink_insufficient_permission() {
|
|||
.stderr_only("cp: 'unreadable' -> 'existing_file.txt': Permission denied (os error 13)\n");
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
#[cfg(target_os = "linux")]
|
||||
#[test]
|
||||
fn test_closes_file_descriptors() {
|
||||
use procfs::process::Process;
|
||||
|
|
|
@ -35,6 +35,7 @@ fn test_valid_arg_exponents() {
|
|||
|
||||
#[test]
|
||||
#[cfg(feature = "sort")]
|
||||
#[cfg(not(target_os = "android"))]
|
||||
fn test_parallel() {
|
||||
use crate::common::util::AtPath;
|
||||
use hex_literal::hex;
|
||||
|
|
|
@ -915,6 +915,7 @@ fn test_compress_merge() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(target_os = "android"))]
|
||||
fn test_compress_fail() {
|
||||
#[cfg(not(windows))]
|
||||
TestScenario::new(util_name!())
|
||||
|
|
|
@ -116,9 +116,10 @@ run_termux_command() {
|
|||
sleep 5
|
||||
|
||||
local timeout=${timeout:-3600}
|
||||
local retries=${retries:-3}
|
||||
local sleep_interval=${sleep_interval:-5}
|
||||
local retries=${retries:-10}
|
||||
local sleep_interval=${sleep_interval:-10}
|
||||
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: "
|
||||
|
||||
|
@ -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; \
|
||||
# build fails for now (https://github.com/nextest-rs/nextest/issues/862): cargo install cargo-nextest; \
|
||||
echo \$? > $probe'"
|
||||
run_termux_command "$command" "$probe"
|
||||
return_code=$?
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue