1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-04-11 22:01:08 +02:00

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@g10code.com>
This commit is contained in:
Justus Winter 2017-04-06 12:33:37 +02:00
parent 01e84d429a
commit 94645311f8
No known key found for this signature in database
GPG Key ID: DD1A52F9DA8C9020
2 changed files with 6 additions and 3 deletions

View File

@ -23,6 +23,7 @@
(load (with-path "defs.scm")) (load (with-path "defs.scm"))
(setup-environment) (setup-environment)
(if (= 0 (call `(,@GPG --list-packets ,(in-srcdir "4gb-packet.asc")))) (unless (have-compression-algo? "BZIP2")
(info "Can parse 4GB packets.") (skip "BZIP2 support not compiled in."))
(fail "Failed to parse 4GB packet."))
(call-check `(,@GPG --list-packets ,(in-srcdir "4gb-packet.asc")))

View File

@ -258,6 +258,8 @@
(not (not (member x (force all-hash-algos))))) (not (not (member x (force all-hash-algos)))))
(define (have-cipher-algo? x) (define (have-cipher-algo? x)
(not (not (member x (force all-cipher-algos))))) (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) (define (gpg-pipe args0 args1 errfd)
(lambda (source sink) (lambda (source sink)