]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: avoid spurious failures when cross-compiling
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 18 Apr 2012 16:04:12 +0000 (18:04 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 18 Apr 2012 16:04:30 +0000 (18:04 +0200)
* t/parallel-tests-recheck-depends-on-all.sh: Skip the test
when cross-compiling.
* t/vala-vapi.sh: Skip tests that do not make sense when
cross-compiling.
* t/yacc-basic.sh: Likewise.
* t/yacc-cxx.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
t/parallel-tests-recheck-depends-on-all.sh
t/vala-vapi.sh
t/yacc-basic.sh
t/yacc-cxx.sh

index cec66ae24df7b250d8dc7efcb7df891510221e85..6c9e4cba98f1ee0e4d337819ef2b83ba2078d66a 100755 (executable)
@@ -18,7 +18,7 @@
 # See automake bug#11252.
 
 am_parallel_tests=yes
-required=cc
+required='cc native'
 . ./defs || Exit 1
 
 cat >> configure.ac << 'END'
index 7ad8742d7398c68f64921263bfb0fb7088673ab4..8df8599984f2785c5e6fa604c8b18d80fee3f6d8 100755 (executable)
@@ -72,7 +72,7 @@ $MAKE
 ls -l        # For debugging.
 cat zardoz.c # Likewise.
 grep 'BARBAR' zardoz.c
-$MAKE test1
+cross_compiling || $MAKE test1 || Exit 1
 
 # Simple check on remake rules.
 $sleep
@@ -83,7 +83,7 @@ sed 's/BARBAR/BAZBAZ/' foo.vapi > t && mv -f t foo.vapi || Exit 99
 $MAKE
 cat zardoz.c # For debugging.
 grep 'BAZBAZ' zardoz.c
-$MAKE test2
+cross_compiling || $MAKE test2 || Exit 1
 
 # Check the distribution.
 $MAKE distcheck
index 71a17e58e2777c7a661a3b4eaa0b48e4c815bbcd..d2fd49061c34e2f9246528a21f99affa6b10248b 100755 (executable)
@@ -70,12 +70,11 @@ test -f bar-parse.output
 if cross_compiling; then :; else
   echo a | ./foo
   echo b | ./foo && Exit 1
+  echo a | ./bar
+  echo b | ./bar && Exit 1
   : For shells with busted 'set -e'.
 fi
 
-echo a | ./bar
-echo b | ./bar && Exit 1
-
 # The Yacc-derived C sources must be shipped.
 $MAKE echo-distcom
 $MAKE -s echo-distcom | grep '[ /]parse\.c '
index fe348cb20d77d85846ff243e93a16c7acf97737c..2af22eee7f33d09cb529c5d0a31a5a5469fdfe98 100755 (executable)
@@ -88,11 +88,13 @@ test -f foo4-parse4.cpp
 test -f foo3-parse3.output
 test -f foo4-parse4.output
 
-for i in 1 2 3 4; do
-  echo a | ./foo$i
-  echo b | ./foo$i && Exit 1
-  : For shells with busted 'set -e'.
-done
+if cross_compiling; then :; else
+  for i in 1 2 3 4; do
+    echo a | ./foo$i
+    echo b | ./foo$i && Exit 1
+    : For shells with busted 'set -e'.
+  done
+fi
 
 # The Yacc-derived C++ sources must be shipped.
 $MAKE echo-distcom