mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
Merge pull request #5318 from sylvestre/gnu-er
run-gnu-test.sh: show if we can't find the file
This commit is contained in:
commit
5fde331c8f
1 changed files with 11 additions and 1 deletions
|
@ -33,7 +33,17 @@ if test $# -ge 1; then
|
||||||
# if set, run only the tests passed
|
# if set, run only the tests passed
|
||||||
SPECIFIC_TESTS=""
|
SPECIFIC_TESTS=""
|
||||||
for t in "$@"; do
|
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"
|
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
|
done
|
||||||
# trim it
|
# trim it
|
||||||
SPECIFIC_TESTS=$(echo $SPECIFIC_TESTS | xargs)
|
SPECIFIC_TESTS=$(echo $SPECIFIC_TESTS | xargs)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue