LVM2/test harness.sh test-utils.sh
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall at sourceware.org 2008-09-29 15:59:21
Added files:
test : harness.sh test-utils.sh
Log message:
Import new test utilities and a test harness.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/harness.sh.diff?cvsroot=lvm2&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/test-utils.sh.diff?cvsroot=lvm2&r1=NONE&r2=1.1
/cvs/lvm2/LVM2/test/harness.sh,v --> standard output revision 1.1
- renamed from test/harness.sh +33 -0
@@ -0,0 +1,33 @@ +#!/bin/sh + +tests="$@" +test -z "$tests" && tests=`echo t-*.sh` + +for t in $tests; do + printf "Running %-40s" "$t ..." + out=`sh ./$t 2>&1` + ret=$? + if test $ret = 0; then + echo " passed." + elif test $ret = 200; then + echo " skipped." + else + echo " FAILED!" + len=`echo $t | wc -c` + # fancy formatting... + printf -- "--- Output: $t -" + for i in `seq $(($len + 14)) 78`; do echo -n "-"; done; echo + printf "%s\n" "$out" + for i in `seq 1 78`; do echo -n "-"; done; echo + failed="$failed $t" + fi +done + +if test -n "$failed"; then + echo "TESTS FAILED:" + for t in $failed; do + printf "\t%s\n" $t + done +else + echo "All tests passed." +fi
/cvs/lvm2/LVM2/test/test-utils.sh,v --> standard output revision 1.1
- renamed from test/test-utils.sh +146 -0
146 lines not on this page · raw message