Hash :
e1606b32
Author :
Date :
2012-02-18T13:59:26
parallel-tests: fix another BSD parallel make issue When BSD make is run in parallel mode, it apparently strips any leading directory component from the automatic variable '$*' (of course, against what POSIX mandates). This was causing FreeBSD 9.0 make and NetBSD 5.1 make to spuriously fail with automake-generated test harnesses if subdir tests were present *and* make was being run in parallel mode. This issue affected also the Automake own testsuite. * lib/am/check2.am (am__set_b): New internal variable. (%OBJ%, %EXT%.log, %EXT%$(EXEEXT).log): Use it to work around the described BSD make issue. * tests/parallel-tests3.test: Enhanced to expose the bug. * tests/parallel-tests-subdir.test: Enhance a little, since we are at it. * NEWS: Update.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
#! /bin/sh
# Copyright (C) 2011-2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check that the parallel-tests driver creates parent directories for
# the log files when needed.
am_parallel_tests=yes
. ./defs || Exit 1
cat >> configure.in << 'END'
AC_OUTPUT
END
cat > Makefile.am << 'END'
TESTS = dir1/foo.test dir2/dir3/foo.test
TEST_LOG_COMPILER = sh
END
mkdir dir1 dir2 dir2/dir3
echo : > dir1/foo.test
echo : > dir2/dir3/foo.test
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
mkdir build
cd build
../configure
$MAKE check
find . # For debugging.
test -f test-suite.log
test -f dir1/foo.log
test -f dir1/foo.trs
test -f dir2/dir3/foo.log
test -f dir2/dir3/foo.trs
: