This is an automated email from the git hooks/post-receive script.
robert.savoye pushed a commit to branch parser in repository toolchain/abe.
The following commit(s) were added to refs/heads/parser by this push: new e69116f move common functions to a seperate file so they can be usd i [...] e69116f is described below
commit e69116f7958af246bbe51963139a64e2537c27c9 Author: Rob Savoye rob.savoye@linaro.org Date: Sun Aug 16 14:19:13 2015 -0600
move common functions to a seperate file so they can be usd in standalone test cases.
Change-Id: I866eb2d2d5810389df6a9c40cb6df56e864980ff --- testsuite/common.sh | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+)
diff --git a/testsuite/common.sh b/testsuite/common.sh new file mode 100644 index 0000000..e0ce7ca --- /dev/null +++ b/testsuite/common.sh @@ -0,0 +1,64 @@ +fixme() +{ + if test x"${debug}" = x"yes"; then + echo "($BASH_LINENO): $*" 1>&2 + fi +} + +trace() +{ + echo "TRACE(#${BASH_LINENO}): ${FUNCNAME[1]} ($*)" 1>&2 +} + +passes=0 +pass() +{ + echo "PASS: $1" + passes="`expr ${passes} + 1`" +} + +xpasses=0 +xpass() +{ + echo "XPASS: $1" + xpasses="`expr ${xpasses} + 1`" +} + +untested=0 +untested() +{ + echo "UNTESTED: $1" + untested="`expr ${untested} + 1`" +} + +failures=0 +fail() +{ + echo "FAIL: $1" + failures="`expr ${failures} + 1`" +} + +xfailures=0 +xfail() +{ + echo "XFAIL: $1" + xfailures="`expr ${xfailures} + 1`" +} + +totals() +{ + echo "" + echo "Total test results:" + echo " Passes: ${passes}" + echo " Failures: ${failures}" + if test ${xpasses} -gt 0; then + echo " Unexpected Passes: ${xpasses}" + fi + if test ${xfailures} -gt 0; then + echo " Expected Failures: ${xfailures}" + fi + if test ${untested} -gt 0; then + echo " Untested: ${untested}" + fi +} +