diff --git a/Makefile b/Makefile index deba1d7..e842774 100644 --- a/Makefile +++ b/Makefile @@ -34,10 +34,8 @@ lock: unlock: sudo yum versionlock clear -test: - echo "You don't want to run this." - exit 1 - pkill gpg-agent ; rm -rf /tmp/tmp.* - export PATH=~/gitwork/blackbox/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin ; \ +confidence: + @if [[ -e ~/.gnupg ]]; then echo ERROR: '~/.gnupg should not exist. If it does, bugs may polute your .gnupg configuration. If the code has no bugs everything will be fine. Do you feel lucky?'; false ; fi + if which >/dev/null gpg-agent ; then pkill gpg-agent ; rm -rf /tmp/tmp.* ; fi + export PATH=~/gitwork/blackbox/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin ; cd ~/gitwork/blackbox && tools/confidence_test.sh - @if [[ -e ~/.gnupg ]]; then echo ERROR: '~/.gnupg' should not exist. If it does, this means test test suite may be poluting your actual .gnupg configuration. ; false ; fi diff --git a/tools/confidence_test.sh b/tools/confidence_test.sh index 000cb87..cd538f4 100755 --- a/tools/confidence_test.sh +++ b/tools/confidence_test.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -export PATH=/home/tlimoncelli/gitwork/blackbox/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin +export PATH="$HOME/gitwork/blackbox/bin":/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin . _stack_lib.sh @@ -45,6 +45,14 @@ function assert_file_group() { local file="$1" local wanted="$2" assert_file_exists "$file" + + case $(uname -s) in + CYGWIN* ) + echo "ASSERT_FILE_GROUP: Running on Cygwin. Not being tested." + return 0 + ;; + esac + local found=$(ls -l "$file" | awk '{ print $4 }') # NB(tlim): We could do this with 'stat' but it would break on BSD-style OSs. if [[ "$wanted" != "$found" ]]; then @@ -119,8 +127,8 @@ PHASE 'She creates a GPG key...' make_self_deleting_tempfile gpgconfig cat >"$gpgconfig" <"$gpgconfig" <