]> scripts.mit.edu Git - wizard.git/blob - tests/setup
Add --continue support to upgrades.
[wizard.git] / tests / setup
1 # this file is meant to be source'd by any test script
2 # we expect the source script to have specified:
3 #   VERSION = version number to apply the test to
4 #   TESTNAME = name of the test
5 # we produce $TESTDIR and $TESTID for config and test script to use.
6
7 VERSION="$1"
8 if [ "$VERSION" == "" ]; then
9     echo "Must specify version"
10     exit 1
11 fi
12
13 UVERSION=`echo "$VERSION" | sed s/[-.]/_/g`
14 TESTID="${TESTNAME}_$UVERSION"
15 TESTDIR="testdir_${TESTNAME}_$VERSION"
16 export WIZARD_ADMIN_NAME="admin"
17 export WIZARD_ADMIN_PASSWORD="wizard"
18
19 if [ -e "config" ]; then
20     source config
21 fi
22
23 if [ -e "$TESTDIR" ]; then
24     echo "Removing previous $TESTDIR folder..."
25     rm -Rf "$TESTDIR"
26 fi
27