mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-24 15:17:02 +01:00
Do not mix test result with progress lines.
This makes parsing of the results easier. Fixes bug#1400. * tests/openpgp/defs.inc (progress_cancel, progress_end) (progress_new): New. * tests/openpgp/conventional-mdc.test: Use progress functions * tests/openpgp/conventional.test: Ditto. * tests/openpgp/encrypt-dsa.test: Ditto. * tests/openpgp/encrypt.test: Ditto. * tests/openpgp/sigs.test: Ditto. -- The new output style is now: > MD5 SHA1 RIPEMD160 SHA256 SHA384 SHA512 SHA224 < PASS: sigs.test or if the test fails: > MD5 SHA1 sigs.test: ooops FAIL: sigs.test (cherry picked from commit f1e1387bee286c7434f0462185048872bcdb4484)
This commit is contained in:
parent
79d7e1d86b
commit
da0925973e
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#info Checking conventional encryption
|
#info Checking conventional encryption
|
||||||
for ciph in `all_cipher_algos`; do
|
for ciph in `all_cipher_algos`; do
|
||||||
echo_n "$ciph "
|
progress "$ciph"
|
||||||
for i in 0 1 2 3 9 10 11 19 20 21 22 23 39 40 41 8192 32000 ; do
|
for i in 0 1 2 3 9 10 11 19 20 21 22 23 39 40 41 8192 32000 ; do
|
||||||
# *BSD's dd can't cope with a count of 0
|
# *BSD's dd can't cope with a count of 0
|
||||||
if test "$i" = "0"; then
|
if test "$i" = "0"; then
|
||||||
@ -27,4 +27,5 @@ for ciph in `all_cipher_algos`; do
|
|||||||
cmp z y || error "$ciph/$i: mismatch"
|
cmp z y || error "$ciph/$i: mismatch"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
echo_n "| "
|
|
||||||
|
progress_end
|
||||||
|
@ -18,7 +18,7 @@ for i in plain-2 data-32000 ; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
for a in `all_cipher_algos`; do
|
for a in `all_cipher_algos`; do
|
||||||
echo_n "$a "
|
progress "$a"
|
||||||
for i in plain-1 data-80000 ; do
|
for i in plain-1 data-80000 ; do
|
||||||
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 \
|
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 \
|
||||||
--cipher-algo $a -c -o x --yes $i
|
--cipher-algo $a -c -o x --yes $i
|
||||||
@ -26,4 +26,5 @@ for a in `all_cipher_algos`; do
|
|||||||
cmp $i y || error "$i: ($a) mismatch"
|
cmp $i y || error "$i: ($a) mismatch"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
echo_n "| "
|
|
||||||
|
progress_end
|
||||||
|
@ -42,18 +42,28 @@ LC_MESSAGES=
|
|||||||
# Internal use.
|
# Internal use.
|
||||||
defs_stop_on_error=no
|
defs_stop_on_error=no
|
||||||
defs_error_seen=no
|
defs_error_seen=no
|
||||||
|
defs_progress_active=no
|
||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
#------ utility functions -------
|
#------ utility functions -------
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
|
||||||
|
progress_cancel () {
|
||||||
|
if [ x$defs_progress_active = xyes ]; then
|
||||||
|
echo
|
||||||
|
defs_progress_active=no
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
fatal () {
|
fatal () {
|
||||||
|
progress_cancel
|
||||||
echo "$pgmname: fatal:" $* >&2
|
echo "$pgmname: fatal:" $* >&2
|
||||||
echo "$pgmname: fatal:" $* >&5
|
echo "$pgmname: fatal:" $* >&5
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
error () {
|
error () {
|
||||||
|
progress_cancel
|
||||||
echo "$pgmname:" $* >&2
|
echo "$pgmname:" $* >&2
|
||||||
defs_error_seen=yes
|
defs_error_seen=yes
|
||||||
echo "$pgmname:" $* >&5
|
echo "$pgmname:" $* >&5
|
||||||
@ -77,6 +87,7 @@ resume_error () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
info () {
|
info () {
|
||||||
|
progress_cancel
|
||||||
echo "$pgmname:" $* >&2
|
echo "$pgmname:" $* >&2
|
||||||
if [ -n "${verbose+set}" ]; then
|
if [ -n "${verbose+set}" ]; then
|
||||||
echo "$pgmname:" $* >&5
|
echo "$pgmname:" $* >&5
|
||||||
@ -87,7 +98,6 @@ linefeed () {
|
|||||||
echo >&2
|
echo >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo_n_init=no
|
echo_n_init=no
|
||||||
echo_n () {
|
echo_n () {
|
||||||
if test "$echo_n_init" = "no"; then
|
if test "$echo_n_init" = "no"; then
|
||||||
@ -110,6 +120,23 @@ echo_n () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
progress_end () {
|
||||||
|
if [ x$defs_progress_active = xyes ]; then
|
||||||
|
echo "<"
|
||||||
|
defs_progress_active=no
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
progress () {
|
||||||
|
if [ x$defs_progress_active != xyes ]; then
|
||||||
|
echo_n " > "
|
||||||
|
defs_progress_active=yes
|
||||||
|
fi
|
||||||
|
echo_n "$* "
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#cleanup () {
|
#cleanup () {
|
||||||
# rm $cleanup_files 2>/dev/null || true
|
# rm $cleanup_files 2>/dev/null || true
|
||||||
# echo "#empty" >./gpg.conf
|
# echo "#empty" >./gpg.conf
|
||||||
|
@ -18,7 +18,7 @@ for i in $plain_files $data_files ; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
for ca in `all_cipher_algos` ; do
|
for ca in `all_cipher_algos` ; do
|
||||||
echo_n "$ca "
|
progress "$ca"
|
||||||
for i in $plain_files $data_files ; do
|
for i in $plain_files $data_files ; do
|
||||||
$GPG $dsa_keyrings --always-trust --cipher-algo $ca -e \
|
$GPG $dsa_keyrings --always-trust --cipher-algo $ca -e \
|
||||||
-o x --yes -r "$dsa_usrname2" $i
|
-o x --yes -r "$dsa_usrname2" $i
|
||||||
@ -26,4 +26,5 @@ for ca in `all_cipher_algos` ; do
|
|||||||
cmp $i y || error "$i: mismatch"
|
cmp $i y || error "$i: mismatch"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
echo_n "| "
|
|
||||||
|
progress_end
|
||||||
|
@ -17,6 +17,7 @@ for i in $plain_files $data_files ; do
|
|||||||
cmp $i y || error "$i: mismatch"
|
cmp $i y || error "$i: mismatch"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo_n " > "
|
||||||
for ca in `all_cipher_algos` ; do
|
for ca in `all_cipher_algos` ; do
|
||||||
echo_n "$ca "
|
echo_n "$ca "
|
||||||
for i in $plain_files $data_files ; do
|
for i in $plain_files $data_files ; do
|
||||||
@ -25,4 +26,4 @@ for ca in `all_cipher_algos` ; do
|
|||||||
cmp $i y || error "$i: mismatch"
|
cmp $i y || error "$i: mismatch"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
echo_n "| "
|
echo "<"
|
||||||
|
@ -17,7 +17,7 @@ for i in $plain_files $data_files; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
for da in `all_hash_algos` ; do
|
for da in `all_hash_algos` ; do
|
||||||
echo_n "$da "
|
progress "$da"
|
||||||
|
|
||||||
# RSA key, so any hash is okay
|
# RSA key, so any hash is okay
|
||||||
if have_pubkey_algo "RSA"; then
|
if have_pubkey_algo "RSA"; then
|
||||||
@ -42,4 +42,5 @@ for da in `all_hash_algos` ; do
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo_n "| "
|
|
||||||
|
progress_end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user