summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-01-16 13:33:24 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-01-16 13:33:24 +0100
commit39cc82288036a005226564fadd05ef19ef0037bb (patch)
treedf186eb0d0229064be3a05d838650aa3c4850aac
parent2cf8c58b3f5e850d44645c23e33ce1be96bcad0b (diff)
implement i quiet run-tests mode which prints only one line per testcase
-rw-r--r--test/integration/framework4
-rwxr-xr-xtest/integration/run-tests14
2 files changed, 17 insertions, 1 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 4bbe1b408..5d54e49b6 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -39,6 +39,10 @@ fi
if [ $MSGLEVEL -le 2 ]; then
msgmsg() { true; }
msgnmsg() { true; }
+ msgtest() { true; }
+ msgpass() { echo -n " ${CPASS}P${CNORMAL}" >&2; }
+ msgskip() { echo -n " ${CWARNING}S${CNORMAL}" >&2; }
+ msgfail() { echo -n " ${CFAIL}FAIL${CNORMAL}" >&2; }
fi
if [ $MSGLEVEL -le 3 ]; then
msginfo() { true; }
diff --git a/test/integration/run-tests b/test/integration/run-tests
index c7ea0a61a..5644f0a05 100755
--- a/test/integration/run-tests
+++ b/test/integration/run-tests
@@ -2,7 +2,19 @@
set -e
DIR=$(readlink -f $(dirname $0))
+if [ "$1" = "-q" ]; then
+ export MSGLEVEL=2
+elif [ "$1" = "-v" ]; then
+ export MSGLEVEL=5
+fi
for testcase in $(run-parts --list $DIR | grep '/test-'); do
- echo "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m"
+ if [ "$1" = "-q" ]; then
+ echo -n "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m"
+ else
+ echo "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m"
+ fi
${testcase}
+ if [ "$1" = "-q" ]; then
+ echo
+ fi
done