mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
run-gnu-test.sh: accept "run-root" as first param
This commit is contained in:
parent
5fde331c8f
commit
22f72544a8
1 changed files with 19 additions and 17 deletions
|
@ -29,25 +29,27 @@ cd "${path_GNU}" && echo "[ pwd:'${PWD}' ]"
|
||||||
|
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
|
|
||||||
if test $# -ge 1; then
|
if test "$1" != "run-root"; then
|
||||||
# if set, run only the tests passed
|
if test $# -ge 1; then
|
||||||
SPECIFIC_TESTS=""
|
# if set, run only the tests passed
|
||||||
for t in "$@"; do
|
SPECIFIC_TESTS=""
|
||||||
|
for t in "$@"; do
|
||||||
|
|
||||||
# Construct the full path
|
# Construct the full path
|
||||||
full_path="$path_GNU/$t"
|
full_path="$path_GNU/$t"
|
||||||
|
|
||||||
# Check if the file exists with .sh, .pl extension or without any extension in the $path_GNU directory
|
# Check if the file exists with .sh, .pl extension or without any extension in the $path_GNU directory
|
||||||
if [ -f "$full_path" ] || [ -f "$full_path.sh" ] || [ -f "$full_path.pl" ]; then
|
if [ -f "$full_path" ] || [ -f "$full_path.sh" ] || [ -f "$full_path.pl" ]; then
|
||||||
SPECIFIC_TESTS="$SPECIFIC_TESTS $t"
|
SPECIFIC_TESTS="$SPECIFIC_TESTS $t"
|
||||||
else
|
else
|
||||||
echo "Error: Test file $full_path, $full_path.sh, or $full_path.pl does not exist!"
|
echo "Error: Test file $full_path, $full_path.sh, or $full_path.pl does not exist!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# trim it
|
# trim it
|
||||||
SPECIFIC_TESTS=$(echo $SPECIFIC_TESTS | xargs)
|
SPECIFIC_TESTS=$(echo $SPECIFIC_TESTS | xargs)
|
||||||
echo "Running specific tests: $SPECIFIC_TESTS"
|
echo "Running specific tests: $SPECIFIC_TESTS"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# * timeout used to kill occasionally errant/"stuck" processes (note: 'release' testing takes ~1 hour; 'debug' testing takes ~2.5 hours)
|
# * timeout used to kill occasionally errant/"stuck" processes (note: 'release' testing takes ~1 hour; 'debug' testing takes ~2.5 hours)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue