Skip to content

Commit

Permalink
Merge pull request #5323 from cakebaker/run_gnu_test_sh_fix_issue_wit…
Browse files Browse the repository at this point in the history
…h_run_root

run-gnu-test.sh: accept "run-root" as first param
  • Loading branch information
sylvestre authored Sep 26, 2023
2 parents 5fde331 + 22f7254 commit 4038907
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions util/run-gnu-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,27 @@ cd "${path_GNU}" && echo "[ pwd:'${PWD}' ]"

export RUST_BACKTRACE=1

if test $# -ge 1; then
# if set, run only the tests passed
SPECIFIC_TESTS=""
for t in "$@"; do

# Construct the full path
full_path="$path_GNU/$t"

# 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
SPECIFIC_TESTS="$SPECIFIC_TESTS $t"
else
echo "Error: Test file $full_path, $full_path.sh, or $full_path.pl does not exist!"
exit 1
fi
done
# trim it
SPECIFIC_TESTS=$(echo $SPECIFIC_TESTS | xargs)
echo "Running specific tests: $SPECIFIC_TESTS"
if test "$1" != "run-root"; then
if test $# -ge 1; then
# if set, run only the tests passed
SPECIFIC_TESTS=""
for t in "$@"; do

# Construct the full path
full_path="$path_GNU/$t"

# 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
SPECIFIC_TESTS="$SPECIFIC_TESTS $t"
else
echo "Error: Test file $full_path, $full_path.sh, or $full_path.pl does not exist!"
exit 1
fi
done
# trim it
SPECIFIC_TESTS=$(echo $SPECIFIC_TESTS | xargs)
echo "Running specific tests: $SPECIFIC_TESTS"
fi
fi

# * timeout used to kill occasionally errant/"stuck" processes (note: 'release' testing takes ~1 hour; 'debug' testing takes ~2.5 hours)
Expand Down

0 comments on commit 4038907

Please sign in to comment.