aboutsummaryrefslogtreecommitdiff
path: root/scripts/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/test.sh')
-rwxr-xr-xscripts/test.sh18
1 files changed, 10 insertions, 8 deletions
diff --git a/scripts/test.sh b/scripts/test.sh
index 550c3953..81d9f346 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -2,34 +2,36 @@
[ -z "$TOPDIR" ] && TOPDIR="$(pwd)"
-rm -rf testdir
-mkdir -p testdir/testdir
+trap 'kill $(jobs -p) 2>/dev/null; exit 1' INT
+
+rm -rf generated/testdir
+mkdir -p generated/testdir/testdir
if [ -z "$TEST_HOST" ]
then
if [ $# -ne 0 ]
then
- PREFIX=testdir/ scripts/single.sh "$@" || exit 1
+ PREFIX=generated/testdir/ scripts/single.sh "$@" || exit 1
else
- make install_flat PREFIX=testdir || exit 1
+ make install_flat PREFIX=generated/testdir || exit 1
fi
fi
-cd testdir
+cd generated/testdir
PATH="$PWD:$PATH"
cd testdir
-. "$TOPDIR"/scripts/test/testing.sh
+. "$TOPDIR"/scripts/runtest.sh
[ -f "$TOPDIR/generated/config.h" ] && export OPTIONFLAGS=:$(echo $(sed -nr 's/^#define CFG_(.*) 1/\1/p' "$TOPDIR/generated/config.h") | sed 's/ /:/g')
if [ $# -ne 0 ]
then
for i in "$@"
do
- . "$TOPDIR"/scripts/test/$i.test
+ . "$TOPDIR"/tests/$i.test
done
else
- for i in "$TOPDIR"/scripts/test/*.test
+ for i in "$TOPDIR"/tests/*.test
do
CMDNAME="$(echo "$i" | sed 's@.*/\(.*\)\.test@\1@')"
if [ -h ../$CMDNAME ] || [ ! -z "$TEST_HOST" ]