automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FYI] {master} tests: avoid spurious failures when cross-compiling


From: Stefano Lattarini
Subject: [FYI] {master} tests: avoid spurious failures when cross-compiling
Date: Wed, 18 Apr 2012 18:05:13 +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 <address@hidden>
---
 t/parallel-tests-recheck-depends-on-all.sh |    2 +-
 t/vala-vapi.sh                             |    4 ++--
 t/yacc-basic.sh                            |    5 ++---
 t/yacc-cxx.sh                              |   12 +++++++-----
 4 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/t/parallel-tests-recheck-depends-on-all.sh 
b/t/parallel-tests-recheck-depends-on-all.sh
index cec66ae..6c9e4cb 100755
--- a/t/parallel-tests-recheck-depends-on-all.sh
+++ b/t/parallel-tests-recheck-depends-on-all.sh
@@ -18,7 +18,7 @@
 # See automake bug#11252.
 
 am_parallel_tests=yes
-required=cc
+required='cc native'
 . ./defs || Exit 1
 
 cat >> configure.ac << 'END'
diff --git a/t/vala-vapi.sh b/t/vala-vapi.sh
index 7ad8742..8df8599 100755
--- a/t/vala-vapi.sh
+++ b/t/vala-vapi.sh
@@ -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
diff --git a/t/yacc-basic.sh b/t/yacc-basic.sh
index 71a17e5..d2fd490 100755
--- a/t/yacc-basic.sh
+++ b/t/yacc-basic.sh
@@ -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 '
diff --git a/t/yacc-cxx.sh b/t/yacc-cxx.sh
index fe348cb..2af22ee 100755
--- a/t/yacc-cxx.sh
+++ b/t/yacc-cxx.sh
@@ -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
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]