aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/test.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/test.sh b/scripts/test.sh
index 160f24f9..550c3953 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -3,7 +3,7 @@
[ -z "$TOPDIR" ] && TOPDIR="$(pwd)"
rm -rf testdir
-mkdir -p testdir
+mkdir -p testdir/testdir
if [ -z "$TEST_HOST" ]
then
@@ -16,7 +16,8 @@ then
fi
cd testdir
-PATH="$(pwd):$PATH"
+PATH="$PWD:$PATH"
+cd testdir
. "$TOPDIR"/scripts/test/testing.sh
[ -f "$TOPDIR/generated/config.h" ] && export OPTIONFLAGS=:$(echo $(sed -nr 's/^#define CFG_(.*) 1/\1/p' "$TOPDIR/generated/config.h") | sed 's/ /:/g')
@@ -31,8 +32,9 @@ else
for i in "$TOPDIR"/scripts/test/*.test
do
CMDNAME="$(echo "$i" | sed 's@.*/\(.*\)\.test@\1@')"
- if [ -h $CMDNAME ] || [ ! -z "$TEST_HOST" ]
+ if [ -h ../$CMDNAME ] || [ ! -z "$TEST_HOST" ]
then
+ cd .. && rm -rf testdir && mkdir testdir && cd testdir || exit 1
. $i
else
echo "$CMDNAME disabled"