From: Michal Sojka Date: Wed, 5 Feb 2014 16:57:27 +0000 (+0100) Subject: Add "Testing" headers X-Git-Tag: fix-allnoconfig~38 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/ee04717343d0fb9c7353f9d26d8cf8b81f0c5bf4 Add "Testing" headers --- diff --git a/continuous/steps/40-run-tests b/continuous/steps/40-run-tests index 413e89a..16a6826 100755 --- a/continuous/steps/40-run-tests +++ b/continuous/steps/40-run-tests @@ -4,4 +4,5 @@ set -e export LINUX_IMAGE=$PWD/linux/arch/powerpc/boot/uImage -run-parts -v ../tests +cd ../tests +run-parts -v . diff --git a/continuous/tests/kernelgw b/continuous/tests/kernelgw index 2bd5594..6a023e4 100755 --- a/continuous/tests/kernelgw +++ b/continuous/tests/kernelgw @@ -1,4 +1,8 @@ -#!/bin/sh +#!/bin/bash + +. lib.sh + +WVSTART Kernel gateway ../gw-setup/run.pl <&2 "Please use bash" + exit 1 +fi + +. wvtest.sh diff --git a/continuous/tests/ugw-mmap-mmap b/continuous/tests/ugw-mmap-mmap index 015d134..a8d1030 100755 --- a/continuous/tests/ugw-mmap-mmap +++ b/continuous/tests/ugw-mmap-mmap @@ -1,4 +1,8 @@ -#!/bin/sh +#!/bin/bash + +. lib.sh + +WVSTART User space gateway (mmap-mmap) ../gw-setup/run.pl <&2 + if [ "$CODE" -ne 0 ]; then + exit $CODE + else + return 0 + fi +} + + +WVPASS() +{ + TEXT="$*" + + _wvfind_caller + if "$@"; then + _wvcheck 0 "$TEXT" + return 0 + else + _wvcheck 1 "$TEXT" + # NOTREACHED + return 1 + fi +} + + +WVFAIL() +{ + TEXT="$*" + + _wvfind_caller + if "$@"; then + _wvcheck 1 "NOT($TEXT)" + # NOTREACHED + return 1 + else + _wvcheck 0 "NOT($TEXT)" + return 0 + fi +} + + +_wvgetrv() +{ + ( "$@" >&2 ) + echo -n $? +} + + +WVPASSEQ() +{ + _wvfind_caller + _wvcheck $(_wvgetrv [ "$#" -eq 2 ]) "exactly 2 arguments" + echo "Comparing:" >&2 + echo "$1" >&2 + echo "--" >&2 + echo "$2" >&2 + _wvcheck $(_wvgetrv [ "$1" = "$2" ]) "'$1' = '$2'" +} + + +WVPASSNE() +{ + _wvfind_caller + _wvcheck $(_wvgetrv [ "$#" -eq 2 ]) "exactly 2 arguments" + echo "Comparing:" >&2 + echo "$1" >&2 + echo "--" >&2 + echo "$2" >&2 + _wvcheck $(_wvgetrv [ "$1" != "$2" ]) "'$1' != '$2'" +} + + +WVPASSRC() +{ + RC=$? + _wvfind_caller + _wvcheck $(_wvgetrv [ $RC -eq 0 ]) "return code($RC) == 0" +} + + +WVFAILRC() +{ + RC=$? + _wvfind_caller + _wvcheck $(_wvgetrv [ $RC -ne 0 ]) "return code($RC) != 0" +} + + +WVSTART() +{ + echo >&2 + _wvfind_caller + echo "Testing \"$*\" in $WVCALLER_FILE:" >&2 +}