aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/openpgp/Makefile.am2
-rw-r--r--tests/openpgp/run-tests.scm22
2 files changed, 13 insertions, 11 deletions
diff --git a/tests/openpgp/Makefile.am b/tests/openpgp/Makefile.am
index cfdd58da5..8f565b338 100644
--- a/tests/openpgp/Makefile.am
+++ b/tests/openpgp/Makefile.am
@@ -197,7 +197,7 @@ EXTRA_DIST = defs.scm $(XTESTS) $(TEST_FILES) \
CLEANFILES = prepared.stamp x y yy z out err $(data_files) \
plain-1 plain-2 plain-3 trustdb.gpg *.lock .\#lk* \
- *.test.log gpg_dearmor gpg.conf gpg-agent.conf S.gpg-agent \
+ *.log gpg_dearmor gpg.conf gpg-agent.conf S.gpg-agent \
pubring.gpg pubring.gpg~ pubring.kbx pubring.kbx~ \
secring.gpg pubring.pkr secring.skr \
gnupg-test.stop random_seed gpg-agent.log tofu.db \
diff --git a/tests/openpgp/run-tests.scm b/tests/openpgp/run-tests.scm
index ce0217b79..9e9bc3d0e 100644
--- a/tests/openpgp/run-tests.scm
+++ b/tests/openpgp/run-tests.scm
@@ -83,16 +83,18 @@
(define (set-pid x)
(new name directory command x retcode))
(define (run-sync . args)
- (with-working-directory directory
- (let* ((p (inbound-pipe))
- (pid (spawn-process-fd (append command args) 0
- (:write-end p) (:write-end p))))
- (close (:write-end p))
- (splice (:read-end p) STDERR_FILENO)
- (close (:read-end p))
- (let ((t' (set-retcode (wait-process name pid #t))))
- (t'::report)
- t'))))
+ (letfd ((log (open (string-append name ".log")
+ (logior O_WRONLY O_BINARY O_CREAT) #o600)))
+ (with-working-directory directory
+ (let* ((p (inbound-pipe))
+ (pid (spawn-process-fd (append command args) 0
+ (:write-end p) (:write-end p))))
+ (close (:write-end p))
+ (splice (:read-end p) STDERR_FILENO log)
+ (close (:read-end p))
+ (let ((t' (set-retcode (wait-process name pid #t))))
+ (t'::report)
+ t')))))
(define (run-sync-quiet . args)
(with-working-directory directory
(set-retcode