]> scripts.mit.edu Git - wizard.git/blobdiff - tests/setup
Move set_git_env to proper place.
[wizard.git] / tests / setup
index edf6db9b929d7bf0ab05c11495d659d97486d220..c8c21ef707178a45f2f3ea4d4ebd4e9209751b4d 100644 (file)
@@ -2,7 +2,9 @@
 # we expect the source script to have specified:
 #   VERSION = version number to apply the test to
 #   TESTNAME = name of the test
-# we produce $TESTDIR and $TESTID for config and test script to use.
+#   APP = name of the application being tested
+# we produce $TESTDIR, $TESTID, $UVERSION and $APPVERSION
+# for config and test script to use.
 
 export PATH="`pwd`/../bin:$PATH"
 
@@ -16,6 +18,14 @@ if [ "$VERSION" == "" ]; then
     fi
 fi
 
+# APPVERSION is directly interpolated into bash, so it can represent
+# 0 arguments.
+if [ "$VERSION" == "head" ]; then
+    APPVERSION="$APP"
+else
+    APPVERSION="$APP-$VERSION-scripts" # XXX incorrect if a -scripts2 version exists
+fi
+
 UVERSION=`echo "$VERSION" | sed s/[-.]/_/g`
 TESTID="${TESTNAME}_$UVERSION"
 echo "$TESTID"