1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02: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
This commit is contained in:
Werner Koch 2012-04-05 20:32:42 +02:00
parent 99fc61f1cf
commit f1e1387bee
6 changed files with 42 additions and 10 deletions

View file

@ -41,12 +41,21 @@ LC_MESSAGES=
# Internal use.
defs_stop_on_error=no
defs_error_seen=no
defs_progress_active=no
#--------------------------------
#------ utility functions -------
#--------------------------------
progress_cancel () {
if [ x$defs_progress_active = xyes ]; then
echo
defs_progress_active=no
fi
}
fatal () {
progress_cancel
echo "$pgmname: fatal:" $* >&2
echo "$pgmname: fatal:" $* >&5
echo stop >gnupg-test.stop
@ -54,6 +63,7 @@ fatal () {
}
error () {
progress_cancel
echo "$pgmname:" $* >&2
defs_error_seen=yes
echo "$pgmname:" $* >&5
@ -77,6 +87,7 @@ resume_error () {
}
info () {
progress_cancel
echo "$pgmname:" $* >&2
if [ -n "${verbose+set}" ]; then
echo "$pgmname:" $* >&5
@ -87,7 +98,6 @@ linefeed () {
echo >&2
}
echo_n_init=no
echo_n () {
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 () {
# rm $cleanup_files 2>/dev/null || true
# echo "#empty" >./gpg.conf