guix-commits
[Top][All Lists]
Advanced

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

05/09: build: Preserve stderr for shell tests.


From: Ludovic Courtès
Subject: 05/09: build: Preserve stderr for shell tests.
Date: Wed, 04 May 2016 21:37:21 +0000

civodul pushed a commit to branch master
in repository guix.

commit 4d9ed58498e3acb5bad1c5b862853f72bd3312aa
Author: Ludovic Courtès <address@hidden>
Date:   Wed May 4 17:49:32 2016 +0200

    build: Preserve stderr for shell tests.
    
    Fixes a regression introduced in
    a9edb211e733b8b34e67ec3b4450567e9376986f where the .log files of the .sh
    tests would not contain stderr.
    
    * build-aux/test-env.in: Redirect stderr only when --quiet-stderr is
    passed.
    * Makefile.am (SCM_LOG_DRIVER): Add --quiet-stderr.
---
 Makefile.am           |    7 +++++--
 build-aux/test-env.in |   14 ++++++++++----
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 4685fe1..6e8dfd3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -297,8 +297,11 @@ TESTS = $(SCM_TESTS) $(SH_TESTS)
 
 AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0
 
-SCM_LOG_DRIVER = $(top_builddir)/test-env $(GUILE) --no-auto-compile \
-                   -e main $(top_srcdir)/build-aux/test-driver.scm
+SCM_LOG_DRIVER =                               \
+  $(top_builddir)/test-env --quiet-stderr      \
+  $(GUILE) --no-auto-compile -e main           \
+      $(top_srcdir)/build-aux/test-driver.scm
+
 AM_SCM_LOG_DRIVER_FLAGS = --brief=yes
 
 SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
diff --git a/build-aux/test-env.in b/build-aux/test-env.in
index c3f60f7..c153763 100644
--- a/build-aux/test-env.in
+++ b/build-aux/test-env.in
@@ -29,12 +29,18 @@
 # stdout.
 unset CDPATH
 
+case "$1" in
+    --quiet-stderr)
+       # Silence the daemon's output, which is often useless, as well as that
+       # of Bash (such as "Terminated" messages when 'guix-daemon' is
+       # killed.)
+       exec 2> /dev/null
+       shift
+       ;;
+esac
+
 if [ -x "@abs_top_builddir@/guix-daemon" ]
 then
-    # Silence the daemon's output, which is often useless, as well as that of
-    # Bash (such as "Terminated" messages when 'guix-daemon' is killed.)
-    exec 2> /dev/null
-
     NIX_STORE_DIR="@GUIX_TEST_ROOT@/store"
 
     # Do that because store.scm calls `canonicalize-path' on it.



reply via email to

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