Add path smarts to ftests.sh and ftests-nocontainer.sh.
When invoked from `make distcheck`, the paths need to be
corrected to account for the non-standard build directory.
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
#!/bin/bash
+
+START_DIR=$PWD
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+
+if [ "$START_DIR" != "$SCRIPT_DIR" ]; then
+ cp "$SCRIPT_DIR"/*.py "$START_DIR"
+fi
+
./ftests.py -l 10 -L ftests-nocontainer.log --skip 28 --no-container
+RET=$?
+
+if [ "$START_DIR" != "$SCRIPT_DIR" ]; then
+ rm -f "$START_DIR"/*.py
+ rm -fr "$START_DIR"/__pycache__
+ rm -f ftests.py.log
+fi
+
+exit $RET
#!/bin/bash
+
+START_DIR=$PWD
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+
+if [ "$START_DIR" != "$SCRIPT_DIR" ]; then
+ cp "$SCRIPT_DIR"/*.py "$START_DIR"
+fi
+
./ftests.py -l 10 -L ftests.log
+RET=$?
+
+if [ "$START_DIR" != "$SCRIPT_DIR" ]; then
+ rm -f "$START_DIR"/*.py
+ rm -fr "$START_DIR"/__pycache__
+ rm -f ftests.py.log
+fi
+
+exit $RET