summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-07-11 17:46:07 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-07-11 17:46:07 -0400
commit48af03c6bade14ec20256c24ef234cab79e1fb35 (patch)
tree99c39e4c794839247c091863f4afe277d47ee821 /tests
parenteb815bce0da27a24ad718c31b77e45032e3a5916 (diff)
try to make keytrans test useful again.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/keytrans15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/keytrans b/tests/keytrans
index 285d17b..bad2ae3 100755
--- a/tests/keytrans
+++ b/tests/keytrans
@@ -30,17 +30,16 @@ trap failed_cleanup EXIT
## set up some variables to ensure that we're operating strictly in
## the tests, not system-wide:
-# make temp dir
-TEMPDIR="$TESTDIR"/tmp
-if [ -e "$TEMPDIR" ] ; then
- echo "tempdir '$TEMPDIR' already exists."
- exit 1
-fi
-mkdir -p "$TEMPDIR"
+mkdir -p "$TESTDIR"/tmp
+TEMPDIR=$(mktemp -d "${TMPDIR:-$TESTDIR/tmp}/monkeyspheretest.XXXXXXX")
+
+mkdir "$TEMPDIR"/bin
+ln -s "$TESTDIR"/../src/share/keytrans "$TEMPDIR"/bin/openpgp2ssh
+ln -s "$TESTDIR"/../src/share/keytrans "$TEMPDIR"/bin/pem2openpgp
# Use the local copy of executables first, instead of system ones.
# This should help us test without installing.
-export PATH="$TESTDIR"/../src/keytrans:"$PATH"
+export PATH="$TEMPDIR"/bin:"$PATH"
######################################################################
### TEST KEYTRANS