aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/testsuite.sh
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/testsuite.sh')
-rwxr-xr-xtestsuite/testsuite.sh39
1 files changed, 29 insertions, 10 deletions
diff --git a/testsuite/testsuite.sh b/testsuite/testsuite.sh
index 943c66e..f4f938d 100755
--- a/testsuite/testsuite.sh
+++ b/testsuite/testsuite.sh
@@ -1,24 +1,43 @@
-#!/bin/sh
+#!/usr/bin/env bash
cd "$(dirname $0)"
. ../utils.sh
+run_suite () {
+ . ../testenv.sh
+ for d in */; do
+ if [ -f $d/testsuite.sh ]; then
+ printf "${ANSI_DARKCYAN}test $d ${ANSI_NOCOLOR}\n"
+ cd $d
+ if . ./testsuite.sh; then
+ printf "${ANSI_GREEN}OK${ANSI_NOCOLOR}\n"
+ else
+ printf "${ANSI_RED}FAILED!${ANSI_NOCOLOR}\n"
+ exit 1
+ fi
+ cd ..
+ else
+ printf "${ANSI_YELLOW}Skip $d (no testsuite.sh)${ANSI_NOCOLOR}\n"
+ fi
+ clean
+ done
+}
+
for d in */; do
- if [ -f $d/testsuite.sh ]; then
- travis_start "test" "$d" "$ANSI_CYAN"
- cd $d
+ cd $d
+ printf "${ANSI_CYAN}test $d ${ANSI_NOCOLOR}\n"
+ if [ -f ./testsuite.sh ]; then
if ./testsuite.sh; then
- printf "${ANSI_GREEN}OK$ANSI_NOCOLOR\n"
+ printf "${ANSI_GREEN}OK${ANSI_NOCOLOR}\n"
else
- printf "${ANSI_RED}FAILED!$ANSI_NOCOLOR\n"
+ printf "${ANSI_RED}FAILED!${ANSI_NOCOLOR}\n"
exit 1
fi
- cd ..
- travis_finish "test"
else
- printf "${ANSI_YELLOW}Skip $d (no testsuite.sh)$ANSI_NOCOLOR\n"
+ run_suite
fi
+ cd ..
done
-printf "${ANSI_GREEN}All tests are OK$ANSI_NOCOLOR\n"
+printf "${ANSI_GREEN}All tests are OK${ANSI_NOCOLOR}\n"
exit 0