[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FYI] {master} tests: fix spurious failures with Solaris dmake
From: |
Stefano Lattarini |
Subject: |
[FYI] {master} tests: fix spurious failures with Solaris dmake |
Date: |
Tue, 17 Jan 2012 10:50:49 +0100 |
Solaris Distributed Make, when run in parallel mode, can sprinkle
its standard output with lines like:
hostname --> 2 jobs
...
hostname --> Job output
...
This behaviour was causing spurious errors in some tests where we
compare the output of make with a known, expected value. Fix that.
* tests/tap-doc.test: Before comparing the output from make with its
expected value, remove extra lines that could have been printed by
Solaris dmake.
* tests/tap-doc2.test: Likewise.
---
tests/tap-doc.test | 6 +++++-
tests/tap-doc2.test | 11 +++++++++++
2 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/tests/tap-doc.test b/tests/tap-doc.test
index 174e5e5..de39b42 100755
--- a/tests/tap-doc.test
+++ b/tests/tap-doc.test
@@ -81,7 +81,11 @@ PASS: mu.tap 1
XFAIL: mu.tap 2 # TODO frobnication not yet implemented
END
-sed -n '/^PASS: foo\.sh/,/^XFAIL: mu\.tap/p' stdout > got
+sed -n '/^PASS: foo\.sh/,/^XFAIL: mu\.tap/p' stdout > t
+cat t
+# Strip extra "informative" lines that could be printed by Solaris
+# Distributed Make.
+LC_ALL=C $EGREP -v ' --> ([0-9][0-9]* job|[Jj]ob output)' t > got
cat exp
cat got
diff --git a/tests/tap-doc2.test b/tests/tap-doc2.test
index 258f2d3..c5fe2b6 100755
--- a/tests/tap-doc2.test
+++ b/tests/tap-doc2.test
@@ -69,6 +69,15 @@ END
chmod a+x *.test
+# Strip extra "informative" lines that could be printed by Solaris
+# Distributed Make.
+strip_dmake_junk ()
+{
+ cat $1
+ LC_ALL=C $EGREP -v ' --> ([0-9][0-9]* job|[Jj]ob output)' "$@" >t
+ mv -f t $1
+}
+
mkdir build-aux
cp "$am_scriptdir"/tap-driver.pl build-aux \
|| framework_failure_ "fetching the perl TAP driver"
@@ -96,6 +105,7 @@ ERROR: baz.test - exited with status 7
END
sed -n '/^PASS: foo\.test/,/^ERROR: baz\.test/p' stdout > got
+strip_dmake_junk got
cat exp
cat got
@@ -118,6 +128,7 @@ PASS: baz.test 1
END
sed -n '/^PASS: foo\.test/,/^PASS: baz\.test/p' stdout > got
+strip_dmake_junk got
cat exp
cat got
--
1.7.7.3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [FYI] {master} tests: fix spurious failures with Solaris dmake,
Stefano Lattarini <=