diff options
author | Werner Koch <wk@gnupg.org> | 2020-09-04 11:29:32 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2020-09-04 11:31:43 +0200 |
commit | b7f56ba5e3cc31415692870cef372ea358458f84 (patch) | |
tree | 3ba5055d74c4e410d29408246acad96960f3a6f0 | |
parent | scd: Support GET DATA response with no header for DO 0x00FA. (diff) | |
download | gnupg2-b7f56ba5e3cc31415692870cef372ea358458f84.tar.xz gnupg2-b7f56ba5e3cc31415692870cef372ea358458f84.zip |
tests: New test run envvar to run gpg under valgrind.
--
Take care: Running under valgrind takes loooong and in some case you
may run into an valgrind internal error.
Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r-- | tests/openpgp/README | 3 | ||||
-rw-r--r-- | tests/openpgp/defs.scm | 12 |
2 files changed, 14 insertions, 1 deletions
diff --git a/tests/openpgp/README b/tests/openpgp/README index aa99acceb..d85ff3f07 100644 --- a/tests/openpgp/README +++ b/tests/openpgp/README @@ -25,6 +25,9 @@ spawned programs to their standard error stream, verbose=2 to see what programs are executed, or verbose=3 to see even more program output and exit codes. +If you want to run gpg under valgrind add with_valgrind=1. + + ** Inspecting the test environment To inspect the environment in which tests are running, or to quickly diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm index 85a013366..f3eccd940 100644 --- a/tests/openpgp/defs.scm +++ b/tests/openpgp/defs.scm @@ -123,6 +123,7 @@ (define bin-prefix (getenv "BIN_PREFIX")) (define installed? (not (string=? "" bin-prefix))) +(define with-valgrind? (not (string=? (getenv "with_valgrind") ""))) (define (tool-hardcoded which) (let ((t (assoc which tools))) @@ -138,7 +139,8 @@ ;; (set! gpg `(,@valgrind ,@gpg)) ;; (define valgrind - '("/usr/bin/valgrind" --leak-check=full --error-exitcode=154)) + '("/usr/bin/valgrind" -q --leak-check=no --track-origins=yes + --error-exitcode=154 --exit-on-first-error=yes)) (unless installed? (setenv "GNUPG_BUILDDIR" (getenv "objdir") #t)) @@ -496,4 +498,12 @@ "but got" trust)))) +;; +;; Enable checking with valgrind if the envvar "with_valgrind" is set +;; +(when with-valgrind? + (set! gpg `(,@valgrind ,@gpg))) + + + ;; end |