[git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-65-gf1e1387

by Werner Koch cvs at cvs.gnupg.org
Thu Apr 5 21:42:03 CEST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  f1e1387bee286c7434f0462185048872bcdb4484 (commit)
      from  99fc61f1cf09c7f72a9037d91d3cf0cd2e035ae6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f1e1387bee286c7434f0462185048872bcdb4484
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Apr 5 20:32:42 2012 +0200

    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

diff --git a/tests/openpgp/conventional-mdc.test b/tests/openpgp/conventional-mdc.test
index a5e5c4e..15b525f 100755
--- a/tests/openpgp/conventional-mdc.test
+++ b/tests/openpgp/conventional-mdc.test
@@ -12,7 +12,7 @@
 
 #info Checking conventional encryption
 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
     # *BSD's dd can't cope with a count of 0
     if test "$i" = "0"; then
@@ -27,4 +27,5 @@ for ciph in `all_cipher_algos`; do
     cmp z y || error "$ciph/$i: mismatch"
   done
 done
-echo_n "| "
+
+progress_end
diff --git a/tests/openpgp/conventional.test b/tests/openpgp/conventional.test
index 1464ee2..5028b29 100755
--- a/tests/openpgp/conventional.test
+++ b/tests/openpgp/conventional.test
@@ -18,7 +18,7 @@ for i in plain-2 data-32000 ; do
 done
 
 for a in `all_cipher_algos`; do
-    echo_n "$a "
+    progress "$a"
     for i in plain-1 data-80000 ; do
       echo "Hier spricht HAL" | $GPG --passphrase-fd 0 \
 					  --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"
     done
 done
-echo_n "| "
+
+progress_end
diff --git a/tests/openpgp/defs.inc b/tests/openpgp/defs.inc
index b9af8fe..49e085e 100755
--- a/tests/openpgp/defs.inc
+++ b/tests/openpgp/defs.inc
@@ -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
diff --git a/tests/openpgp/encrypt-dsa.test b/tests/openpgp/encrypt-dsa.test
index ed474d0..8ae93d8 100755
--- a/tests/openpgp/encrypt-dsa.test
+++ b/tests/openpgp/encrypt-dsa.test
@@ -18,7 +18,7 @@ for i in $plain_files $data_files ; do
 done
 
 for ca in `all_cipher_algos` ; do
-    echo_n "$ca "
+    progress "$ca"
     for i in $plain_files $data_files ; do
 	$GPG --always-trust --cipher-algo $ca -e \
 	    -o x --yes -r "$dsa_usrname2" $i
@@ -26,4 +26,5 @@ for ca in `all_cipher_algos` ; do
 	cmp $i y || error "$i: mismatch"
     done
 done
-echo_n "| "
+
+progress_end
diff --git a/tests/openpgp/encrypt.test b/tests/openpgp/encrypt.test
index c50c66c..5ef5196 100755
--- a/tests/openpgp/encrypt.test
+++ b/tests/openpgp/encrypt.test
@@ -17,6 +17,7 @@ for i in $plain_files $data_files ; do
     cmp $i y || error "$i: mismatch"
 done
 
+echo_n "    > "
 for ca in `all_cipher_algos` ; do
     echo_n "$ca "
     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"
     done
 done
-echo_n "| "
+echo "<"
diff --git a/tests/openpgp/sigs.test b/tests/openpgp/sigs.test
index 28ce9f1..d6d8898 100755
--- a/tests/openpgp/sigs.test
+++ b/tests/openpgp/sigs.test
@@ -17,7 +17,7 @@ for i in $plain_files $data_files; do
 done
 
 for da in `all_hash_algos` ; do
-    echo_n "$da "
+    progress "$da"
 
     # RSA key, so any hash is okay
     if have_pubkey_algo "RSA"; then
@@ -42,4 +42,5 @@ for da in `all_hash_algos` ; do
         done
     fi
 done
-echo_n "| "
+
+progress_end

-----------------------------------------------------------------------

Summary of changes:
 tests/openpgp/conventional-mdc.test |    5 +++--
 tests/openpgp/conventional.test     |    5 +++--
 tests/openpgp/defs.inc              |   29 ++++++++++++++++++++++++++++-
 tests/openpgp/encrypt-dsa.test      |    5 +++--
 tests/openpgp/encrypt.test          |    3 ++-
 tests/openpgp/sigs.test             |    5 +++--
 6 files changed, 42 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list