From f27a70ecc268f9318dbf87d23c451a3bad464ed1 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 26 Apr 2022 17:20:08 +0900 Subject: 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 --- tests/gpgscm/init.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/gpgscm/init.scm') 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. -- cgit v1.2.3