aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/init.scm
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2022-04-26 08:20:08 +0000
committerNIIBE Yutaka <[email protected]>2022-04-26 08:20:08 +0000
commitf27a70ecc268f9318dbf87d23c451a3bad464ed1 (patch)
treee7b5769bd2951d9f463e4381d199605fae1d5513 /tests/gpgscm/init.scm
parenttests: Support single invocation with variant. (diff)
downloadgnupg-f27a70ecc268f9318dbf87d23c451a3bad464ed1.tar.gz
gnupg-f27a70ecc268f9318dbf87d23c451a3bad464ed1.zip
tests: Avoid auto-removal when test fails.
* tests/gpgscm/init.scm (*exit-status*): New. (exit): Set *exit-status*. * tests/gpgscm/tests.scm (mkdtemp-autoremove): Check exit-status and only remove the directory if not zero. -- Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'tests/gpgscm/init.scm')
-rw-r--r--tests/gpgscm/init.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/gpgscm/init.scm b/tests/gpgscm/init.scm
index 66bec0f79..4c8c5125c 100644
--- a/tests/gpgscm/init.scm
+++ b/tests/gpgscm/init.scm
@@ -654,8 +654,11 @@
;; resource management a chance to clean up.
(define *interpreter-exit* (gensym))
+(define *exit-status* 0)
+
;; Terminate the process returning STATUS to the parent.
(define (exit status)
+ (set! *exit-status* status)
(throw "interpreter exit" *interpreter-exit* status))
;; A list of functions run at interpreter shutdown.