]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: fix spurious failures with Solaris dmake
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 17 Jan 2012 09:33:46 +0000 (10:33 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 17 Jan 2012 09:33:54 +0000 (10:33 +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
tests/tap-doc2.test

index 174e5e567a1f48119523d30b70ff4ad058da20d0..de39b42b6bb7cd916727288a73fe1216189c8c10 100755 (executable)
@@ -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
index 258f2d376b51e217dec048281b6dfcf2608ac075..c5fe2b6d1583b11ca5d24273dca83c5c4c6c7b82 100755 (executable)
@@ -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