From 21af8bfd077dad5411ba07bd2208b6d216ad686f Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 18 Feb 2012 09:47:57 +0100 Subject: [PATCH] tests: avoid FreeBSD make VPATH issues in more tests (see bug#7884) See also similar change 'v1.11-755-g818bc40' of 07-02-2012, "tests: work around bug#7884 in many yacc/lex tests". The rationale for this change is basically the same. * tests/lex-lib-external.test: Use "yl_distcheck" instead of bare "$MAKE distcheck" to avoid extra failures caused by automake bug#7884. * tests/lex-noyywrap.test: Likewise. * tests/lex-libobj.test: Likewise. * tests/man6.test: This test suffers from the same FreeBSD make incompatibility in VPATH handling that is the source of automake bug#7884. Since this is caused by rules that are defined in the Makefile.am by the test itself, rather that being generated by automake, the best thing to do is to skip this test if we detect the presence of said make incompatibility (through the function 'useless_vpath_rebuild'). * tests/man8.test: Likewise. --- tests/lex-lib-external.test | 2 +- tests/lex-libobj.test | 2 +- tests/lex-noyywrap.test | 2 +- tests/man6.test | 4 ++++ tests/man8.test | 4 ++++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/lex-lib-external.test b/tests/lex-lib-external.test index d50ae395f..47bee778a 100755 --- a/tests/lex-lib-external.test +++ b/tests/lex-lib-external.test @@ -71,6 +71,6 @@ if cross_compiling; then :; else echo BAD | ./lexer && Exit 1 : For shells with busted 'set -e'. fi -$MAKE distcheck +yl_distcheck : diff --git a/tests/lex-libobj.test b/tests/lex-libobj.test index 3bd4f8aa9..3837a0b1b 100755 --- a/tests/lex-libobj.test +++ b/tests/lex-libobj.test @@ -70,6 +70,6 @@ grep LIBOBJS Makefile # For debugging. grep '^LIBOBJS *=.*yywrap.*\.o' Makefile # Sanity check. $MAKE -$MAKE distcheck +yl_distcheck : diff --git a/tests/lex-noyywrap.test b/tests/lex-noyywrap.test index 5b002c8d7..a0eb731e3 100755 --- a/tests/lex-noyywrap.test +++ b/tests/lex-noyywrap.test @@ -67,6 +67,6 @@ if cross_compiling; then :; else fi # Sanity check on distribution. -$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS='LEXLIB="none needed"' +yl_distcheck DISTCHECK_CONFIGURE_FLAGS='LEXLIB="none needed"' : diff --git a/tests/man6.test b/tests/man6.test index aa49049ea..daf08421b 100755 --- a/tests/man6.test +++ b/tests/man6.test @@ -20,6 +20,10 @@ required=help2man . ./defs || Exit 1 +# Avoid a spurious failure due to a known FreeBSD make incompatibility. +useless_vpath_rebuild \ + && skip_ "VPATH useless rebuild detected (see bug#7884)" + cat > Makefile.am << 'END' dist_man_MANS = $(srcdir)/foobar.1 bazquux.1 zardoz.1 dist_bin_SCRIPTS = foobar bazquux zardoz diff --git a/tests/man8.test b/tests/man8.test index e03341bd3..bdc0febf7 100755 --- a/tests/man8.test +++ b/tests/man8.test @@ -18,6 +18,10 @@ . ./defs || Exit 1 +# Avoid a spurious failure due to a known FreeBSD make incompatibility. +useless_vpath_rebuild \ + && skip_ "VPATH useless rebuild detected (see bug#7884)" + cat > Makefile.am << 'END' dist_man_MANS = foo.1 foo.1: -- 2.34.1