# -*-sh-*-
+function findup() {
+ local arg="$1"
+ if test -z "$arg"; then return 1; fi
+
+ local wd=$PWD
+ while ! test -f "$arg"; do
+ cd ..
+ if test "$PWD" = "/"; then
+ cd $wd
+ exit 1
+ fi
+ done
+
+ echo $PWD/$arg
+ cd $wd
+}
+
function error() {
echo $1 > _error
exit 1
echo $1 > _error
exit 2
}
+
+if [ -z "$OMK_TESTSROOT" ]; then
+ # We are not called by tester.py - probably, a single test was
+ # executed by hand.
+
+ tester=$(findup tester.py)
+ python $tester # Run tester in the current
+ # directory
+ exit
+fi
+