From 06d5d37ffe25f4f66b58bbf1e4e51fa276ba4996 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Sun, 5 Apr 2009 23:37:34 -0700 Subject: couple of modifications to the test: - unset MONKEYSPHERE_SUBKEYS_FOR_AGENT, since it will confuse the test into trying to add the user's key to the agent. - use cpio to copy a full directory tree, instead of cp -a, since cp on Darwin doesn't understand the -a option. --- tests/basic | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/basic b/tests/basic index 7277168..f38c9ac 100755 --- a/tests/basic +++ b/tests/basic @@ -129,6 +129,10 @@ export MONKEYSPHERE_LOG_LEVEL=DEBUG export MONKEYSPHERE_CORE_KEYLENGTH=1024 export MONKEYSPHERE_PROMPT=false +# unset SUBKEYS_FOR_AGENT variable which, if set, would confuse the +# into trying to use the user's key, instead of the testuser's key +unset MONKEYSPHERE_SUBKEYS_FOR_AGENT + export SSHD_CONFIG="$TEMPDIR"/sshd_config export SOCKET="$TEMPDIR"/ssh-socket @@ -146,7 +150,8 @@ export DISPLAY=monkeys echo echo "##################################################" echo "### configuring testuser home..." -cp -a "$TESTDIR"/home/testuser "$TEMPDIR"/ +(cd "$TESTDIR"/home && find testuser | cpio -pdu "$TEMPDIR") + # set up environment for testuser export TESTHOME="$TEMPDIR"/testuser export GNUPGHOME="$TESTHOME"/.gnupg @@ -166,7 +171,7 @@ get_gpg_prng_arg >> "$GNUPGHOME"/gpg.conf echo echo "##################################################" echo "### configuring admin home..." -cp -a "$TESTDIR"/home/admin "$TEMPDIR"/ +(cd "$TESTDIR"/home && find admin | cpio -pdu "$TEMPDIR") # set up sshd echo -- cgit v1.2.3 From 00ff70f6038a20c09968bc7b1cd2309916e178a8 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Mon, 6 Apr 2009 23:31:09 -0700 Subject: make test prompt for shell on failure enbabled by default, and turned off with env variable MONKEYSPHERE_TEST_NO_EXAMINE --- Makefile | 2 +- tests/common | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/Makefile b/Makefile index 58ef332..5f87a16 100755 --- a/Makefile +++ b/Makefile @@ -81,6 +81,6 @@ releasenote: ./utils/build-releasenote test: - ./tests/basic + MONKEYSPHERE_TEST_NO_EXAMINE=true ./tests/basic .PHONY: all tarball debian-package freebsd-distinfo clean install installman releasenote test diff --git a/tests/common b/tests/common index e53c31e..a000c56 100644 --- a/tests/common +++ b/tests/common @@ -3,7 +3,7 @@ failed_cleanup() { # FIXME: can we be more verbose here? echo 'FAILED!' - if [ "$MONKEYSPHERE_TEST_ALLOW_EXAMINATION" = prompt ] ; then + if [ -z "$MONKEYSPHERE_TEST_NO_EXAMINE" ] ; then read -p "press enter to cleanup and remove tmp (or type bash for a subshell to examine): " XX if [ "$XX" = bash ] ; then echo "Entering subshell..." -- cgit v1.2.3