guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/5] Automake custom test driver using SRFI-64.


From: Mathieu Lirzin
Subject: Re: [PATCH 0/5] Automake custom test driver using SRFI-64.
Date: Sat, 02 Apr 2016 12:59:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi,

address@hidden (Ludovic Courtès) writes:

> Mathieu Lirzin <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]