# HG changeset patch # User Paul Boddie # Date 1454082272 -3600 # Node ID 48b37822d2a06ed7c8a297c0f3d06c3bae2c9e73 # Parent 8fff9da40e5d071e92c8e701f9b86535a028aafe Moved common test initialisation into a separate script. diff -r 8fff9da40e5d -r 48b37822d2a0 tests/common.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/common.sh Fri Jan 29 16:44:32 2016 +0100 @@ -0,0 +1,45 @@ +#!/bin/sh + +THIS_DIR=`dirname "$0"` +BASE_DIR="$THIS_DIR/.." + +STORE=/tmp/store +STATIC=/tmp/static +PREFS=/tmp/prefs + +ARGS="-S $STORE -P $STATIC -p $PREFS -d" + +ACCEPT_SCRIPT="$THIS_DIR/test_handle.py" +ACCEPT_ARGS="accept $STORE $PREFS" + +COUNTER_SCRIPT="$THIS_DIR/test_handle.py" +COUNTER_ARGS="counter $STORE $PREFS" + +DECLINE_SCRIPT="$THIS_DIR/test_handle.py" +DECLINE_ARGS="decline $STORE $PREFS" + +FREEBUSY_SCRIPT="$BASE_DIR/tools/make_freebusy.py" +FREEBUSY_ARGS="-s -n" + +OUTGOING_SCRIPT="$BASE_DIR/imip_person_outgoing.py" + +PERSON_SCRIPT="$BASE_DIR/imip_person.py" + +RESOURCE_SCRIPT="$BASE_DIR/imip_resource.py" + +SHOWMAIL="$BASE_DIR/tools/showmail.py" + +TAB=`printf '\t'` + +TEMPLATES="$THIS_DIR/templates" + +ERROR=err.tmp + +PYTHONPATH="$BASE_DIR" +export PYTHONPATH + +rm -rf $STORE +rm -rf $STATIC +rm -rf $PREFS +rm -f $ERROR +rm -f out*.tmp diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_freebusy_publishing.sh --- a/tests/test_freebusy_publishing.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_freebusy_publishing.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,30 +1,11 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -PERSON_SCRIPT="$THIS_DIR/../imip_person.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:paul.boddie@example.com" SENDER="mailto:resource-room-confroom@example.com" FBFILE="$STORE/$USER/freebusy" FBOTHERFILE="$STORE/$USER/freebusy-other/$SENDER" -TAB=`printf '\t'` - -PYTHONPATH="$THIS_DIR/.." -export PYTHONPATH - -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_multiple_invitation.sh --- a/tests/test_multiple_invitation.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_multiple_invitation.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,23 +1,9 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" ROOM="mailto:resource-room-confroom@example.com" CAR="mailto:resource-car-porsche911@example.com" -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$ROOM" echo 'Europe/Oslo' > "$PREFS/$ROOM/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_outgoing_invitation.sh --- a/tests/test_outgoing_invitation.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_outgoing_invitation.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,24 +1,9 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:paul.boddie@example.com" FBFILE="$STORE/$USER/freebusy" -TAB=`printf '\t'` -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_person_invitation.sh --- a/tests/test_person_invitation.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_person_invitation.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,38 +1,11 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -PERSON_SCRIPT="$THIS_DIR/../imip_person.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:vincent.vole@example.com" SENDER="mailto:paul.boddie@example.com" FBFILE="$STORE/$USER/freebusy" FBOTHERFILE="$STORE/$USER/freebusy-other/$SENDER" -TAB=`printf '\t'` - -OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py" - -PYTHONPATH="$THIS_DIR/.." -export PYTHONPATH - -ACCEPT_SCRIPT="$THIS_DIR/test_handle.py" -ACCEPT_ARGS="accept $STORE $PREFS" - -DECLINE_SCRIPT="$THIS_DIR/test_handle.py" -DECLINE_ARGS="decline $STORE $PREFS" - -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_person_invitation_add.sh --- a/tests/test_person_invitation_add.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_person_invitation_add.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,40 +1,13 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -PERSON_SCRIPT="$THIS_DIR/../imip_person.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:vincent.vole@example.com" SENDER="mailto:paul.boddie@example.com" FBFILE="$STORE/$USER/freebusy" FBOTHERFILE="$STORE/$USER/freebusy-other/$SENDER" FBSENDERFILE="$STORE/$SENDER/freebusy" FBSENDEROTHERFILE="$STORE/$SENDER/freebusy-other/$USER" -TAB=`printf '\t'` - -OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py" - -PYTHONPATH="$THIS_DIR/.." -export PYTHONPATH - -ACCEPT_SCRIPT="$THIS_DIR/test_handle.py" -ACCEPT_ARGS="accept $STORE $PREFS" - -DECLINE_SCRIPT="$THIS_DIR/test_handle.py" -DECLINE_ARGS="decline $STORE $PREFS" - -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_person_invitation_counter.sh --- a/tests/test_person_invitation_counter.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_person_invitation_counter.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,14 +1,7 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -PERSON_SCRIPT="$THIS_DIR/../imip_person.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:vincent.vole@example.com" SENDER="mailto:paul.boddie@example.com" FBFILE="$STORE/$USER/freebusy" @@ -16,29 +9,6 @@ FBSENDERFILE="$STORE/$SENDER/freebusy" FBSENDEROTHERFILE="$STORE/$SENDER/freebusy-other/$USER" FBSENDERREQUESTS="$STORE/$SENDER/requests" -TAB=`printf '\t'` - -OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py" - -PYTHONPATH="$THIS_DIR/.." -export PYTHONPATH - -ACCEPT_SCRIPT="$THIS_DIR/test_handle.py" -ACCEPT_ARGS="accept $STORE $PREFS" - -COUNTER_SCRIPT="$THIS_DIR/test_handle.py" -COUNTER_ARGS="counter $STORE $PREFS" - -DECLINE_SCRIPT="$THIS_DIR/test_handle.py" -DECLINE_ARGS="decline $STORE $PREFS" - -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_person_invitation_recurring.sh --- a/tests/test_person_invitation_recurring.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_person_invitation_recurring.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,39 +1,12 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -PERSON_SCRIPT="$THIS_DIR/../imip_person.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:vincent.vole@example.com" SENDER="mailto:paul.boddie@example.com" FBFILE="$STORE/$USER/freebusy" FBOTHERFILE="$STORE/$USER/freebusy-other/$SENDER" FBSENDERFILE="$STORE/$SENDER/freebusy" -TAB=`printf '\t'` - -OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py" - -PYTHONPATH="$THIS_DIR/.." -export PYTHONPATH - -ACCEPT_SCRIPT="$THIS_DIR/test_handle.py" -ACCEPT_ARGS="accept $STORE $PREFS" - -DECLINE_SCRIPT="$THIS_DIR/test_handle.py" -DECLINE_ARGS="decline $STORE $PREFS" - -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_person_invitation_refresh.sh --- a/tests/test_person_invitation_refresh.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_person_invitation_refresh.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,39 +1,12 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -PERSON_SCRIPT="$THIS_DIR/../imip_person.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:vincent.vole@example.com" SENDER="mailto:paul.boddie@example.com" FBFILE="$STORE/$USER/freebusy" FBOTHERFILE="$STORE/$USER/freebusy-other/$SENDER" FBSENDERFILE="$STORE/$SENDER/freebusy" -TAB=`printf '\t'` - -OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py" - -PYTHONPATH="$THIS_DIR/.." -export PYTHONPATH - -ACCEPT_SCRIPT="$THIS_DIR/test_handle.py" -ACCEPT_ARGS="accept $STORE $PREFS" - -DECLINE_SCRIPT="$THIS_DIR/test_handle.py" -DECLINE_ARGS="decline $STORE $PREFS" - -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_person_non_participation.sh --- a/tests/test_person_non_participation.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_person_non_participation.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,40 +1,13 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -PERSON_SCRIPT="$THIS_DIR/../imip_person.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:vincent.vole@example.com" IMPOSTER="mailto:oliver.otter@example.com" SENDER="mailto:paul.boddie@example.com" FBFILE="$STORE/$USER/freebusy" FBOTHERFILE="$STORE/$USER/freebusy-other/$SENDER" FBIMPOSTERFILE="$STORE/$SENDER/freebusy-other/$IMPOSTER" -TAB=`printf '\t'` - -OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py" - -PYTHONPATH="$THIS_DIR/.." -export PYTHONPATH - -ACCEPT_SCRIPT="$THIS_DIR/test_handle.py" -ACCEPT_ARGS="accept $STORE $PREFS" - -DECLINE_SCRIPT="$THIS_DIR/test_handle.py" -DECLINE_ARGS="decline $STORE $PREFS" - -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'no' > "$PREFS/$USER/participating" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_resource_invitation.sh --- a/tests/test_resource_invitation.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_resource_invitation.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,22 +1,8 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:resource-room-confroom@example.com" -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_resource_invitation_add.sh --- a/tests/test_resource_invitation_add.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_resource_invitation_add.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,31 +1,12 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -PERSON_SCRIPT="$THIS_DIR/../imip_person.py" -RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:resource-room-confroom@example.com" SENDER="mailto:paul.boddie@example.com" FBFILE="$STORE/$USER/freebusy" FBSENDERFILE="$STORE/$SENDER/freebusy" FBSENDEROTHERFILE="$STORE/$SENDER/freebusy-other/$USER" -TAB=`printf '\t'` - -OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py" - -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_resource_invitation_bad.sh --- a/tests/test_resource_invitation_bad.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_resource_invitation_bad.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,22 +1,8 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:resource-room-confroom@example.com" -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_resource_invitation_constraints.sh --- a/tests/test_resource_invitation_constraints.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_resource_invitation_constraints.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,15 +1,7 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -PERSON_SCRIPT="$THIS_DIR/../imip_person.py" -RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:resource-room-sauna@example.com" SENDER="mailto:paul.boddie@example.com" RIVALSENDER="mailto:vincent.vole@example.com" @@ -19,17 +11,6 @@ FBSENDEROTHERFILE="$STORE/$SENDER/freebusy-other/$USER" FBSENDERREQUESTS="$STORE/$SENDER/requests" FBRIVALSENDERFILE="$STORE/$RIVALSENDER/freebusy" -TAB=`printf '\t'` - -OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py" - -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_resource_invitation_constraints_alternative.sh --- a/tests/test_resource_invitation_constraints_alternative.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_resource_invitation_constraints_alternative.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,15 +1,7 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -PERSON_SCRIPT="$THIS_DIR/../imip_person.py" -RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:resource-room-sauna@example.com" SENDER="mailto:paul.boddie@example.com" RIVALSENDER="mailto:vincent.vole@example.com" @@ -19,17 +11,6 @@ FBSENDEROTHERFILE="$STORE/$SENDER/freebusy-other/$USER" FBSENDERREQUESTS="$STORE/$SENDER/requests" FBRIVALSENDERFILE="$STORE/$RIVALSENDER/freebusy" -TAB=`printf '\t'` - -OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py" - -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_resource_invitation_constraints_next_free.sh --- a/tests/test_resource_invitation_constraints_next_free.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_resource_invitation_constraints_next_free.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,15 +1,7 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -PERSON_SCRIPT="$THIS_DIR/../imip_person.py" -RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:resource-room-sauna@example.com" SENDER="mailto:paul.boddie@example.com" RIVALSENDER="mailto:vincent.vole@example.com" @@ -20,17 +12,6 @@ FBSENDEROTHERFILE="$STORE/$SENDER/freebusy-other/$USER" FBSENDERREQUESTS="$STORE/$SENDER/requests" FBRIVALSENDERFILE="$STORE/$RIVALSENDER/freebusy" -TAB=`printf '\t'` - -OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py" - -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_resource_invitation_group.sh --- a/tests/test_resource_invitation_group.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_resource_invitation_group.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,24 +1,9 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:resource-room-confroom@example.com" -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp - mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" echo 'share' > "$PREFS/$USER/freebusy_sharing" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_resource_invitation_imposter.sh --- a/tests/test_resource_invitation_imposter.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_resource_invitation_imposter.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,22 +1,8 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:resource-room-confroom@example.com" -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_resource_invitation_recurring.sh --- a/tests/test_resource_invitation_recurring.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_resource_invitation_recurring.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,22 +1,8 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:resource-room-confroom@example.com" -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_resource_invitation_recurring_day.sh --- a/tests/test_resource_invitation_recurring_day.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_resource_invitation_recurring_day.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,22 +1,8 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:resource-room-confroom@example.com" -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_resource_invitation_recurring_indefinitely.sh --- a/tests/test_resource_invitation_recurring_indefinitely.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_resource_invitation_recurring_indefinitely.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,25 +1,8 @@ #!/bin/sh -THIS_DIR=`dirname $0` -BASE_DIR="$THIS_DIR/.." +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -RESOURCE_SCRIPT="$BASE_DIR/imip_resource.py" -FREEBUSY_SCRIPT="$BASE_DIR/tools/make_freebusy.py" -SHOWMAIL="$BASE_DIR/tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" -FBARGS="-s -n" USER="mailto:resource-room-confroom@example.com" -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID" @@ -54,7 +37,7 @@ && echo "Success" \ || echo "Failed" -PYTHONPATH="$BASE_DIR" "$FREEBUSY_SCRIPT" "$USER" $FBARGS $ARGS 2>> $ERROR +"$FREEBUSY_SCRIPT" "$USER" $FREEBUSY_ARGS $ARGS 2>> $ERROR grep -q 'event14@example.com' "$STORE/$USER/freebusy-providers" \ && echo "Success" \ diff -r 8fff9da40e5d -r 48b37822d2a0 tests/test_resource_invitation_recurring_timezones.sh --- a/tests/test_resource_invitation_recurring_timezones.sh Fri Jan 29 15:31:04 2016 +0100 +++ b/tests/test_resource_invitation_recurring_timezones.sh Fri Jan 29 16:44:32 2016 +0100 @@ -1,22 +1,8 @@ #!/bin/sh -THIS_DIR=`dirname $0` +. "`dirname \"$0\"`/common.sh" -TEMPLATES="$THIS_DIR/templates" -RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py" -SHOWMAIL="$THIS_DIR/../tools/showmail.py" -STORE=/tmp/store -STATIC=/tmp/static -PREFS=/tmp/prefs -ARGS="-S $STORE -P $STATIC -p $PREFS -d" USER="mailto:resource-room-confroom@example.com" -ERROR=err.tmp - -rm -rf $STORE -rm -rf $STATIC -rm -rf $PREFS -rm -f $ERROR -rm -f out*.tmp mkdir -p "$PREFS/$USER" echo 'Europe/Oslo' > "$PREFS/$USER/TZID"