"make test" now uses "expect" to not prompt for passwords.
This commit is contained in:
3
Makefile
3
Makefile
@@ -127,7 +127,6 @@ test: confidence
|
||||
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="$(PWD)/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/local/bin:$(PATH)" ; tools/confidence_test.sh
|
||||
tools/confidence_test.sh
|
||||
@export PATH="$(PWD)/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/local/bin:$(PATH)" ; tools/auto_system_test
|
||||
@if which >/dev/null gpg-agent ; then pkill gpg-agent ; fi
|
||||
@if [ -e ~/.gnupg ]; then echo ERROR: '~/.gnupg was created which means the scripts might be poluting GnuPG configuration. Fix this bug.'; false ; fi
|
||||
|
||||
14
tools/auto_system_test
Executable file
14
tools/auto_system_test
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env expect
|
||||
|
||||
spawn tools/confidence_test.sh
|
||||
|
||||
set times 0;
|
||||
while { $times < 300 } {
|
||||
expect {
|
||||
"my password is the lowercase letter a" { set pw "a\n" ; exp_continue }
|
||||
"my password is the lowercase letter b" { set pw "b\n" ; exp_continue }
|
||||
"Passphrase:" { send $pw ; exp_continue }
|
||||
eof { break }
|
||||
}
|
||||
set times [ expr $times+1];
|
||||
}
|
||||
Reference in New Issue
Block a user