Make confidence tests compatible with Cygwin.
This commit is contained in:
10
Makefile
10
Makefile
@@ -34,10 +34,8 @@ lock:
|
|||||||
unlock:
|
unlock:
|
||||||
sudo yum versionlock clear
|
sudo yum versionlock clear
|
||||||
|
|
||||||
test:
|
confidence:
|
||||||
echo "You don't want to run this."
|
@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
|
||||||
exit 1
|
if which >/dev/null gpg-agent ; then pkill gpg-agent ; rm -rf /tmp/tmp.* ; fi
|
||||||
pkill gpg-agent ; rm -rf /tmp/tmp.*
|
export PATH=~/gitwork/blackbox/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin ;
|
||||||
export PATH=~/gitwork/blackbox/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin ; \
|
|
||||||
cd ~/gitwork/blackbox && tools/confidence_test.sh
|
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
|
#!/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
|
. _stack_lib.sh
|
||||||
|
|
||||||
@@ -45,6 +45,14 @@ function assert_file_group() {
|
|||||||
local file="$1"
|
local file="$1"
|
||||||
local wanted="$2"
|
local wanted="$2"
|
||||||
assert_file_exists "$file"
|
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 }')
|
local found=$(ls -l "$file" | awk '{ print $4 }')
|
||||||
# NB(tlim): We could do this with 'stat' but it would break on BSD-style OSs.
|
# NB(tlim): We could do this with 'stat' but it would break on BSD-style OSs.
|
||||||
if [[ "$wanted" != "$found" ]]; then
|
if [[ "$wanted" != "$found" ]]; then
|
||||||
@@ -119,8 +127,8 @@ PHASE 'She creates a GPG key...'
|
|||||||
make_self_deleting_tempfile gpgconfig
|
make_self_deleting_tempfile gpgconfig
|
||||||
cat >"$gpgconfig" <<EOF
|
cat >"$gpgconfig" <<EOF
|
||||||
%echo Generating a basic OpenPGP key
|
%echo Generating a basic OpenPGP key
|
||||||
Key-Type: default
|
Key-Type: RSA
|
||||||
Subkey-Type: default
|
Subkey-Type: RSA
|
||||||
Name-Real: Alice Example
|
Name-Real: Alice Example
|
||||||
Name-Comment: my password is the lowercase letter a
|
Name-Comment: my password is the lowercase letter a
|
||||||
Name-Email: alice@example.com
|
Name-Email: alice@example.com
|
||||||
@@ -157,8 +165,8 @@ PHASE 'Bob creates a gpg key.'
|
|||||||
|
|
||||||
cat >"$gpgconfig" <<EOF
|
cat >"$gpgconfig" <<EOF
|
||||||
%echo Generating a basic OpenPGP key
|
%echo Generating a basic OpenPGP key
|
||||||
Key-Type: default
|
Key-Type: RSA
|
||||||
Subkey-Type: default
|
Subkey-Type: RSA
|
||||||
Name-Real: Bob Example
|
Name-Real: Bob Example
|
||||||
Name-Comment: my password is the lowercase letter b
|
Name-Comment: my password is the lowercase letter b
|
||||||
Name-Email: bob@example.com
|
Name-Email: bob@example.com
|
||||||
|
|||||||
Reference in New Issue
Block a user