aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches/tests-run-Don-t-redirect-stderr-by-process-substitut.patch
blob: 1a300f2adcf10942d713e4194c508ff9cc24be50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 49d7a90c159b12173ce202fb9b101465b87da96c Mon Sep 17 00:00:00 2001
From: Guilhem Moulin <guilhem@fripost.org>
Date: Sun, 15 Dec 2019 03:38:59 +0100
Subject: [PATCH 2/2] tests/run: Don't redirect stderr by process substitution.

This seems to cause timing issues.
---
 tests/run | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/run b/tests/run
index a34e4a9..4aa0685 100755
--- a/tests/run
+++ b/tests/run
@@ -202,11 +202,13 @@ prepare
 interimap() { _interimap_cmd "interimap" "$@"; }
 pullimap()  { _interimap_cmd "pullimap"  "$@"; }
 _interimap_cmd() {
-    declare -a ENVIRON=() r=0
-    local script="$1"
+    declare -a ENVIRON=()
+    local script="$1" rv=0
     shift
     environ_set "local"
-    env -i "${ENVIRON[@]}" perl -I./lib -T "./$script" "$@" 2> >(tee "$STDERR" >&2)
+    env -i "${ENVIRON[@]}" perl -I./lib -T "./$script" "$@" 2>"$STDERR" || rv=$?
+    cat <"$STDERR" >&2
+    return $rv
 }
 interimap_init() {
     local u="${1-remote}"
-- 
2.24.0