Make confidence tests compatible with Cygwin.
This commit is contained in:
10
Makefile
10
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
|
||||
|
||||
@@ -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" <<EOF
|
||||
%echo Generating a basic OpenPGP key
|
||||
Key-Type: default
|
||||
Subkey-Type: default
|
||||
Key-Type: RSA
|
||||
Subkey-Type: RSA
|
||||
Name-Real: Alice Example
|
||||
Name-Comment: my password is the lowercase letter a
|
||||
Name-Email: alice@example.com
|
||||
@@ -157,8 +165,8 @@ PHASE 'Bob creates a gpg key.'
|
||||
|
||||
cat >"$gpgconfig" <<EOF
|
||||
%echo Generating a basic OpenPGP key
|
||||
Key-Type: default
|
||||
Subkey-Type: default
|
||||
Key-Type: RSA
|
||||
Subkey-Type: RSA
|
||||
Name-Real: Bob Example
|
||||
Name-Comment: my password is the lowercase letter b
|
||||
Name-Email: bob@example.com
|
||||
|
||||
Reference in New Issue
Block a user