mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
tests: Write a log file for each test.
* tests/openpgp/Makefile.am (CLEANFILES): Delete logs. * tests/openpgp/run-tests.scm (test::run-sync): Write logs. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
abe0cc7a21
commit
26df829fa2
@ -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 \
|
||||
|
@ -83,16 +83,18 @@
|
||||
(define (set-pid x)
|
||||
(new name directory command x retcode))
|
||||
(define (run-sync . args)
|
||||
(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)
|
||||
(splice (:read-end p) STDERR_FILENO log)
|
||||
(close (:read-end p))
|
||||
(let ((t' (set-retcode (wait-process name pid #t))))
|
||||
(t'::report)
|
||||
t'))))
|
||||
t')))))
|
||||
(define (run-sync-quiet . args)
|
||||
(with-working-directory directory
|
||||
(set-retcode
|
||||
|
Loading…
x
Reference in New Issue
Block a user