summaryrefslogtreecommitdiff
path: root/test/runTest
diff options
context:
space:
mode:
Diffstat (limited to 'test/runTest')
-rwxr-xr-xtest/runTest23
1 files changed, 10 insertions, 13 deletions
diff --git a/test/runTest b/test/runTest
index b8713d8..adeb84e 100755
--- a/test/runTest
+++ b/test/runTest
@@ -1,15 +1,12 @@
#!/bin/bash
-. "$(dirname ${BASH_SOURCE[0]})/lib/common.inc"
-
-for t in "$(dirname ${BASH_SOURCE[0]})/test.d/"*.sh; do
- l=$(basename ${t} .sh)
- if [ -x ${t} ]; then
- msg "Running test '${l}'"
- ${t}
- [ $? -ne 0 ] && die "Test '${l}' failed"
- echo -e "\n\n\n"
- else
- warning "Skipping test ${l}"
- fi
-done
+curdir=$(readlink -e $(dirname $0))
+
+testSuite=$(mktemp)
+trap "rm -rf '${testSuite}'" EXIT
+
+echo ". ${curdir}/lib/common.inc" > ${testSuite}
+cat "${curdir}/test.d"/*.sh >> ${testSuite}
+echo ". ${curdir}/lib/shunit2" >> ${testSuite}
+
+bash ${testSuite}