summaryrefslogtreecommitdiff
path: root/tests/canon7.test
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2011-05-15 16:33:01 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2011-05-19 22:11:44 +0200
commite9e5d4ac2d8ba980211303c9b1e16c3199f34478 (patch)
tree65fef4db51bb41d7b13c68e9a0b3ccc4fb1df460 /tests/canon7.test
parent920781c510b0219d44eb3201a9e6373f1c9b50a9 (diff)
downloadautomake-e9e5d4ac2d8ba980211303c9b1e16c3199f34478.tar.gz
tests: avoid spurious failures in cross-compile mode
* tests/depcomp2.test: Ensure verbose printing of captured stderr from configure. * tests/ansi3.test ($required): Add 'native', as the ansi2knr functionality is not meant to work with a cross-compiler. * tests/ansi3b.test: Likewise. * tests/ansi5.test: Likewise. * tests/ansi6.test: Likewise. * tests/ansi7.test: Likewise. * tests/ansi8.test: Likewise. * tests/ansi10.test: Likewise. * tests/subobj3.test: Likewise. * tests/check8.test ($required): Add 'native', as this test is not meant to work with a cross-compiler. * tests/gnits2.test: Likewise. * tests/ltconv.test: Likewise. * tests/ltcond2.test: Likewise. * tests/parallel-tests5.test: Likewise. * tests/specflg7.test: Likewise. * tests/specflg8.test: Likewise. * tests/check5.test: Likewise. Also, ensure verbose printing of captured make output, and thrown in few cosmetic and consistency improvements. * tests/ltinit.test: Be laxer in grepping configure output, to avoid spurious failures on systems which lack POSIX dynamic linking (e.g., MinGW), or when cross-compiling for such systems. * tests/ansi9.test: Skip parts of the test that would require a native compiler. * tests/backcompat6.test: Likewise. * tests/depcomp8a.test: Likewise. * tests/pr401.test: Likewise. * tests/pr401b.test: Likewise. * tests/pr401c.test: Likewise. * tests/target-cflags.test: Likewise. * tests/lex3.test: Likewise. * tests/yacc-basic.test: Likewise. * tests/autohdr4.test: Likewise. Also, extend the test to ensure more coverage in cross-compile mode. * tests/canon7.test: Likewise. * tests/check9.test: Removed, split into two new tests ... * tests/check-subst-prog.test: ... this one, which requires a native C compiler ... * tests/check-subst.test: ... and this one, which doesn't require any compiler. * tests/parallel-tests4.test: Removed, split into two new tests ... * tests/parallel-tests-suffix-prog.test: ... this one, which requires a native C compiler ... * tests/parallel-tests-suffix.test: ... and this one, which doesn't require any compiler. * tests/parallel-tests7.test: Removed, split into two new tests ... * tests/parallel-tests-ext-driver-prog.test: ... this one, which requires a native C compiler ... * tests/parallel-tests-ext-driver.test: ... and this one, which doesn't require any compiler. * tests/Makefile.am (TESTS): Update.
Diffstat (limited to 'tests/canon7.test')
-rwxr-xr-xtests/canon7.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/canon7.test b/tests/canon7.test
index 32b607c25..8df283c2d 100755
--- a/tests/canon7.test
+++ b/tests/canon7.test
@@ -23,6 +23,7 @@ cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB dnl: for static libraries
AC_PROG_LIBTOOL dnl: for libtool libraries
+AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
AC_OUTPUT
END
@@ -49,12 +50,18 @@ lib_zardoz___la_SOURCES = libd.c
check-local:
ls -l
+if CROSS_COMPILING
+ test -f ./,foo-bar$(EXEEXT)
+ test -f ./dummy_static$(EXEEXT)
+ test -f ./dummy_dynamic$(EXEEXT)
+else !CROSS_COMPILING
./,foo-bar
./dummy_static
./dummy_dynamic
./,foo-bar | grep 'Hello, FooBar!'
./dummy_static | grep 'Hello from Static!'
./dummy_dynamic | grep 'Hello from Dynamic!'
+endif !CROSS_COMPILING
END
cat > foobar.c << 'END'