summaryrefslogtreecommitdiff
path: root/build-aux/test-env.in
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-05-04 17:49:32 +0200
committerLudovic Courtès <ludo@gnu.org>2016-05-04 23:35:55 +0200
commit4d9ed58498e3acb5bad1c5b862853f72bd3312aa (patch)
tree3ee00f56b895458e89d79323bd503db8c9e07ca6 /build-aux/test-env.in
parent958dd3ce68733bcd5c1231424c7e4ad39e67594a (diff)
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.
Diffstat (limited to 'build-aux/test-env.in')
-rw-r--r--build-aux/test-env.in14
1 files changed, 10 insertions, 4 deletions
diff --git a/build-aux/test-env.in b/build-aux/test-env.in
index c3f60f7283..c153763a56 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.