1# #-- 02-unittest.test --# 2# source the master var file when it's there 3[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master 4# use .tpkg.var.test for in test variable passing 5[ -f .tpkg.var.test ] && source .tpkg.var.test 6 7. ../common.sh 8PRE="../.." 9get_make 10(cd $PRE ; $MAKE unittest; $MAKE lock-verify) 11 12if (cd $PRE; ./unittest); then 13 echo "unit test worked." 14else 15 echo "unit test failed." 16 exit 1 17fi 18if test -f $PRE/ublocktrace.0; then 19 if (cd $PRE; ./lock-verify ublocktrace.*); then 20 echo "lock-verify test worked." 21 else 22 echo "lock-verify test failed." 23 exit 1 24 fi 25fi 26exit 0 27