]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] tests: fix test driver botch-up on Solaris
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 23 Jul 2012 14:57:00 +0000 (16:57 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 24 Jul 2012 08:37:12 +0000 (10:37 +0200)
This issue is very similar to the one fixed by commit v1.12.2-31-g587e0c6.

The test 't/memoize.sh' was producing a '.log' file with few overly-long
lines (more than 12k characters long) and, when Solaris XPG4 awk was in
use, that was causing the 'test-driver.sh' script to experience a spurious
failure:

    /usr/xpg4/bin/awk: line 382 (B): Record too long (LIMIT: 19999 bytes)
    tap-driver.sh: fatal: I/O or internal error

* t/memoize.sh: Temporary disable shell tracing and make output in a few
places, to prevent the resulting '.log' file to contain overly long lines.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
t/memoize.tap

index 6d5eda414c3cb70dbd8638ebe50736b1bada725e..a08942e4feaa28b53b91a8477c147065a9f05ce9 100755 (executable)
@@ -88,15 +88,23 @@ END
 var=foo
 for i in 1 2 3 4 5 6 7 8 9 10 11 12; do
   var=$var$var
+  # Temporary disable shell traces, because otherwise the result '.log' file
+  # would end up having too long lines that could confuse inferior awk
+  # implementations (e.g., Solaris 10 /usr/xpg4/bin/awk), which would cause
+  # spurious errors in our test harness.
+  set +x
 done
+set -x # Re-enable shell traces.
 
 T "very long variable name" <<END
 
 $var = \$(call am__memoize,$var,foo)
 
 test:
-       test '\$($var)' = foo
-       test '\$($var)' = foo
+       # Why we silence this?
+       # See comment above about overly long lines in '.log' file.
+       @echo test1; test '\$($var)' = foo
+       @echo test2; test '\$($var)' = foo
 END
 
 #---------------------------------------------------------------------------
@@ -107,15 +115,20 @@ val=bar
 for i in 1 2 3 4 5 6 7 8 9 10 11 12; do
   var=$var$var
   val=$val$val
+  # Temporary disable shell traces.  See comment above for a rationale.
+  set +x
 done
+set -x # Re-enable shell traces.
 
 T "very long variable name with long content" <<END
 
 $var = \$(call am__memoize,$var,$val)
 
 test:
-       test '\$($var)' = '$val'
-       test '\$($var)' = '$val'
+       # Why we silence this?
+       # See comment above about overly long lines in '.log' file.
+       @echo test1; test '\$($var)' = '$val'
+       @echo test2; test '\$($var)' = '$val'
 END
 
 #---------------------------------------------------------------------------