Move test.sh to bin/ and allow test_cli.sh to take absolute path to whck
This commit is contained in:
parent
9fca3d5736
commit
d0570c1edb
|
@ -29,10 +29,10 @@ if [ -z "$1" ]; then
|
||||||
# cli script needs to be executed to get absolute path to the program
|
# cli script needs to be executed to get absolute path to the program
|
||||||
export WHCK="$("$FIND_WHCK")"
|
export WHCK="$("$FIND_WHCK")"
|
||||||
else
|
else
|
||||||
if [ -x "$ORIGDIR"/"$1" ]; then
|
if [ -f "$ORIGDIR"/"$1" ] && [ -x "$ORIGDIR"/"$1" ]; then
|
||||||
export WHCK="$(realpath "$ORIGDIR"/"$1")"
|
|
||||||
elif [ -x "$1" ]; then
|
|
||||||
export WHCK="$(realpath "$ORIGDIR"/"$1")"
|
export WHCK="$(realpath "$ORIGDIR"/"$1")"
|
||||||
|
elif [ -f "$1" ] && [ -x "$1" ]; then
|
||||||
|
export WHCK="$(realpath "$1")"
|
||||||
else
|
else
|
||||||
echo "ERROR: Could not find provided validation program: "$1""
|
echo "ERROR: Could not find provided validation program: "$1""
|
||||||
exit 2
|
exit 2
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
# TODO: save exit codes of various tests so we can know how many failed
|
# TODO: save exit codes of various tests so we can know how many failed
|
||||||
function testVariousScenarios() {
|
function testVariousScenarios() {
|
||||||
echo "Running various tests from "$(pwd)""
|
echo "Running various tests from "$(pwd)""
|
||||||
./test.sh || echo "ERROR running from repo"
|
bin/test.sh || echo "ERROR running from repo"
|
||||||
cd spec
|
cd spec
|
||||||
./test_cli.sh || echo "ERROR test_cli.sh failed with implicit ../cli"
|
./test_cli.sh || echo "ERROR test_cli.sh failed with implicit ../cli"
|
||||||
./test_cli.sh "$(../bin/cli)" || echo "ERROR test_cli with explicit result from ../cli"
|
./test_cli.sh "$(../bin/cli)" || echo "ERROR test_cli with explicit result from ../cli"
|
||||||
../test.sh || echo "ERROR test.sh failed called from spec submodule"
|
../bin/test.sh || echo "ERROR test.sh failed called from spec submodule"
|
||||||
cd tests
|
cd tests
|
||||||
../../test.sh || echo "ERROR test.sh failed from spec/tests folder"
|
../../bin/test.sh || echo "ERROR test.sh failed from spec/tests folder"
|
||||||
../test_cli.sh || echo "ERROR test_cli.sh failed from spec/tests folder with implicit ../../cli"
|
../test_cli.sh || echo "ERROR test_cli.sh failed from spec/tests folder with implicit ../../cli"
|
||||||
../test_cli.sh "$(../../bin/cli)" || echo "ERROR test_cli.sh failed from spec/tests folder with explicit result from ../../cli"
|
../test_cli.sh "$(../../bin/cli)" || echo "ERROR test_cli.sh failed from spec/tests folder with explicit result from ../../cli"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue