1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-31 11:41:32 +01: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"))
(setup-environment)
(if (= 0 (call `(,@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 `(,@GPG --list-packets ,(in-srcdir "4gb-packet.asc")))

View File

@ -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)