[Pkg-gnupg-commit] [gnupg2] 09/132: tests: Make test more robust.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed May 17 03:07:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit 94645311f8a3e9ae33643512f87fbef41bf0556f
Author: Justus Winter <justus at g10code.com>
Date: Thu Apr 6 12:33:37 2017 +0200
tests: Make test more robust.
* tests/openpgp/4gb-packet.scm: Skip if we do not have BZIP2.
* tests/openpgp/defs.scm (have-compression-algo?): New function.
GnuPG-bug-id: 3028
Signed-off-by: Justus Winter <justus at g10code.com>
---
tests/openpgp/4gb-packet.scm | 7 ++++---
tests/openpgp/defs.scm | 2 ++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/openpgp/4gb-packet.scm b/tests/openpgp/4gb-packet.scm
index b827181..109e61d 100755
--- a/tests/openpgp/4gb-packet.scm
+++ b/tests/openpgp/4gb-packet.scm
@@ -23,6 +23,7 @@
(load (with-path "defs.scm"))
(setup-environment)
-(if (= 0 (call `(, at GPG --list-packets ,(in-srcdir "4gb-packet.asc"))))
- (info "Can parse 4GB packets.")
- (fail "Failed to parse 4GB packet."))
+(unless (have-compression-algo? "BZIP2")
+ (skip "BZIP2 support not compiled in."))
+
+(call-check `(, at GPG --list-packets ,(in-srcdir "4gb-packet.asc")))
diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm
index 815a560..29eb775 100644
--- a/tests/openpgp/defs.scm
+++ b/tests/openpgp/defs.scm
@@ -258,6 +258,8 @@
(not (not (member x (force all-hash-algos)))))
(define (have-cipher-algo? x)
(not (not (member x (force all-cipher-algos)))))
+(define (have-compression-algo? x)
+ (not (not (member x (force all-compression-algos)))))
(define (gpg-pipe args0 args1 errfd)
(lambda (source sink)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list