installer: utils: Dump command output to syslog when testing.
authorMathieu Othacehe <othacehe@gnu.org>
Mon, 8 Jun 2020 13:14:49 +0000 (15:14 +0200)
committerMathieu Othacehe <othacehe@gnu.org>
Tue, 9 Jun 2020 08:32:19 +0000 (10:32 +0200)
commitf73ed5579157a074093bae7a2ffb59a85412be0d
tree4da9852eb057f0508fdb056591e53c4fc8f3ad03
parent8423c2d3097da2d9d25b6f56c1971ac7147d3ad9
installer: utils: Dump command output to syslog when testing.

When debugging the installation tests, it can be very handy to be able to read
"run-command" output, for instance when executing "guix system init".

Introduce a new "invoke-with-log" procedure that is able to log a command
standard and error outputs to the syslog. Use it, only when running the
installation tests, to dump "run-command" output.

* gnu/installer/utils.scm (open-pipe-with-stderr, invoke-with-log): New
procedures,
(invoke-log-port): new variable,
(run-command): move to the end of the file and use invoke-with-log when
running the installation tests.
gnu/installer/utils.scm