summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2010-04-05 22:32:04 +0200
committerMichael Buesch <mb@bu3sch.de>2010-04-05 22:32:04 +0200
commit881bc0a983bc1c407d41df29c3dfb7d901884932 (patch)
tree4d27a0d0d368986622cfe126df3c043f74c9b8f6 /tests
parent218ae8e306b1884f7a384f55dff67f34e3ddec64 (diff)
downloadtoprammer-881bc0a983bc1c407d41df29c3dfb7d901884932.tar.xz
toprammer-881bc0a983bc1c407d41df29c3dfb7d901884932.zip
testsuite: Option for verbose output
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run-tests.sh21
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
index 9a31220..9a92eb7 100755
--- a/tests/run-tests.sh
+++ b/tests/run-tests.sh
@@ -47,11 +47,17 @@ function toprammer
{
local args="$@"
local logfile="$tmpdir/toprammer.log"
+
echo " toprammer $args"
- $basedir/../toprammer $args >$logfile 2>&1
- if [ $? -ne 0 ]; then
- [ -r "$logfile" ] && cat "$logfile"
- die "toprammer $args <<<FAILED>>>"
+ if [ $verbose -eq 0 ]; then
+ $basedir/../toprammer $args >$logfile 2>&1
+ if [ $? -ne 0 ]; then
+ [ -r "$logfile" ] && cat "$logfile"
+ die "toprammer $args <<<FAILED>>>"
+ fi
+ else
+ $basedir/../toprammer $args -V2
+ [ $? -eq 0 ] || die "toprammer $args <<<FAILED>>>"
fi
}
@@ -132,6 +138,7 @@ function usage
echo
echo "Options:"
echo " -h|--help Show this help text"
+ echo " -V|--verbose Be verbose"
echo
echo "If the optional scriptpath is specified, only that testscript"
echo "is executed. The scriptpath is DEVICE/TESTSCRIPT. Example:"
@@ -142,11 +149,17 @@ function usage
# Parse commandline
nr_scriptpaths=0
+verbose=0
while [ $# -gt 0 ]; do
if [ "$1" = "-h" -o "$1" = "--help" ]; then
usage
exit 0
fi
+ if [ "$1" = "-V" -o "$1" = "--verbose" ]; then
+ verbose=1
+ shift
+ continue
+ fi
scriptpaths[nr_scriptpaths]="$1"
let nr_scriptpaths=nr_scriptpaths+1
shift
bues.ch cgit interface