mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-25 08:41:00 -06:00
test runner script: be more verbose if something goes wrong
This commit is contained in:
parent
bff2b8c72d
commit
ec369207bc
@ -11,7 +11,7 @@ function usage() {
|
|||||||
echo "Usage:"
|
echo "Usage:"
|
||||||
echo
|
echo
|
||||||
echo "runTest.sh TEST_TYPE TEST_BINARY [TEST_ARGS]"
|
echo "runTest.sh TEST_TYPE TEST_BINARY [TEST_ARGS]"
|
||||||
echo "where TEST_TYPE can either be --plain or --simulation"
|
echo "where TEST_TYPE can either be --plain or --simulation (is '$TEST_TYPE')."
|
||||||
};
|
};
|
||||||
|
|
||||||
function validateResults() {
|
function validateResults() {
|
||||||
@ -48,6 +48,15 @@ fi
|
|||||||
|
|
||||||
# find the binary in the its folder
|
# find the binary in the its folder
|
||||||
TEST_BINARY=$(find -type f -executable -name "$TEST_NAME")
|
TEST_BINARY=$(find -type f -executable -name "$TEST_NAME")
|
||||||
|
NUM_BINARIES=$(echo "$TEST_BINARY" | wc -w)
|
||||||
|
|
||||||
|
|
||||||
|
if test "$NUM_BINARIES" != "1"; then
|
||||||
|
echo "No binary file found or binary file is non-unique (is: $TEST_BINARY)"
|
||||||
|
echo
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# make sure the binary is of the test is present
|
# make sure the binary is of the test is present
|
||||||
if ! test -x "$TEST_BINARY"; then
|
if ! test -x "$TEST_BINARY"; then
|
||||||
|
Loading…
Reference in New Issue
Block a user