Hi, [email protected] (Ludovic Courtès) writes:
> Mathieu Lirzin <[email protected]> skribis: > >> It is possible to directly checkout 'origin/wip-check' branch to review these >> patches. Thanks. >> >> Mathieu Lirzin (5): >> tests: Silence %cpio-program. >> build: Add a Guile custom test driver using SRFI-64. >> tests: Silence guix-daemon. >> tests: Silence %have-nix-hash?. >> tests: Silence tar. > > I’m looking at it now. My first question is whether we could avoid > silencing everything? > > I guess I got used to having an extra .log file containing “noise”, in > addition to the well-formatted .log file, and it’s proved useful on a > few occasions. Indeed, that would be great and desirable to have all the extra information in the log file. 'build-aux/test-driver' achieves it by simply forking and redirecting stdout and stderr to the log file, like this: --8<---------------cut here---------------start------------->8--- # Test script is run here. "$@" >$log_file 2>&1 estatus=$? --8<---------------cut here---------------end--------------->8--- I don't know if it is possible to replicate a redirection of all the error noises without forking the process. for now I am using something similar to this: (let ((log (open-output-file "tests/foo.log"))) (parameterize ((current-output-port log) (current-error-port log) (current-warning-port log)) (load-from-path "tests/foo.scm") ...)) But for example if tests/foo.scm calls ‘system’, the output will be displayed to the terminal not to the log file. Do you know a way to fix that? If forking is the only option then the child process would still require access to the parent's stdout directly or by an IPC in order to display the short tests results: SKIP: tests/base32.scm PASS: tests/base64.scm ... -- Mathieu Lirzin
