summaryrefslogtreecommitdiff
path: root/php
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2008-08-07 22:05:36 -0700
committerRuss Allbery <rra@stanford.edu>2008-08-07 22:05:36 -0700
commit21b5e27b032ec355274049c167a2f51bdb4e1c21 (patch)
tree792dffb27aaa0d0ebface6be940852234cc22a40 /php
parent97c7eaba1ff73e00eb50c810948b4e9c3a2b909e (diff)
Add some additional setup needed for tests
Diffstat (limited to 'php')
-rwxr-xr-xphp/test-wrapper10
1 files changed, 8 insertions, 2 deletions
diff --git a/php/test-wrapper b/php/test-wrapper
index 3644a37..03767a0 100755
--- a/php/test-wrapper
+++ b/php/test-wrapper
@@ -56,7 +56,7 @@ if [ -f "$top/tests/data/test.keytab" ] ; then
# Try a few different syntaxes for kinit to allow for Heimdal, MIT, or the
# Stanford-local hack.
- KRB5CCNAME=remctl-test.cache
+ KRB5CCNAME="`pwd`"/remctl-test.cache
export KRB5CCNAME
kinit -k -t "$keytab" "$principal" >/dev/null </dev/null
status=$?
@@ -81,17 +81,22 @@ if [ -f "$top/tests/data/test.keytab" ] ; then
else
if [ ! -f remctl-test.pid ] ; then
echo 'remctld did not start' >&2
+ else
+ echo "$principal" > remctl-test.princ
fi
fi
fi
+# Create a link for the test data directory, needed by the remctl config.
+ln -s "$top"/tests/data data
+
# Now we can finally run the tests, which will use remctl-test.pid as a flag
# for whether to try the Kerberos tests.
make test
status=$?
# Kill the remctl server.
-rm remctl-test.cache
+rm remctl-test.cache remctl-test.princ
if [ "$status" = 0 ] ; then
rm -f remctl-test.out
fi
@@ -101,6 +106,7 @@ if [ -f remctl-test.pid ] ; then
fi
# Clean up our symlinks.
+rm data
for file in modules/* ; do
if [ `basename "$file"` != remctl.so ] ; then
rm "$file"