unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Lirzin <mthl@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 0/5] Automake custom test driver using SRFI-64.
Date: Sat, 02 Apr 2016 12:59:46 +0200	[thread overview]
Message-ID: <871t6ol1i5.fsf@gnu.org> (raw)
In-Reply-To: <87fuv5kq85.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 01 Apr 2016 22:51:06 +0200")

Hi,

ludo@gnu.org (Ludovic Courtès) writes:

> Mathieu Lirzin <mthl@gnu.org> 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	other threads:[~2016-04-02 11:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 23:38 [PATCH 0/5] Automake custom test driver using SRFI-64 Mathieu Lirzin
2016-03-23 23:38 ` [PATCH 1/5] tests: Silence %cpio-program Mathieu Lirzin
2016-03-23 23:38 ` [PATCH 2/5] build: Add a Guile custom test driver using SRFI-64 Mathieu Lirzin
2016-03-23 23:38 ` [PATCH 3/5] tests: Silence guix-daemon Mathieu Lirzin
2016-03-23 23:38 ` [PATCH 4/5] tests: Silence %have-nix-hash? Mathieu Lirzin
2016-03-23 23:38 ` [PATCH 5/5] tests: Silence tar Mathieu Lirzin
2016-03-24  4:15 ` [PATCH 0/5] Automake custom test driver using SRFI-64 Eric Bavier
2016-03-24 17:02   ` Mathieu Lirzin
2016-03-27 21:39 ` Ludovic Courtès
2016-03-27 21:47   ` Mathieu Lirzin
2016-04-01 20:51 ` Ludovic Courtès
2016-04-02 10:59   ` Mathieu Lirzin [this message]
2016-04-02 13:22     ` Ludovic Courtès
2016-04-02 14:25       ` Mathieu Lirzin
2016-04-03 12:33         ` Mathieu Lirzin
2016-04-03 21:30           ` Ludovic Courtès
2016-04-01 21:45 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871t6ol1i5.fsf@gnu.org \
    --to=mthl@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).