- The AM_COND_IF macro also works if the shell expression for the
conditional is no longer valid for the condition.
+ - The automake-provided parallel testsuite harness does not fail anymore
+ with BSD make used in parallel mode when there are test scripts in a
+ subdirectory, like in:
+
+ TESTS = sub/foo.test sub/bar.test
+
* Long-standing bugs:
- Automake's own build system finally have a real "installcheck" target.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+if %?FIRST%
+## 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). Try to detect and work
+## around this incompatibility.
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+endif %?FIRST%
+
## From a test file to a .log and .trs file.
?GENERIC?%EXT%.log:
?!GENERIC?%OBJ%: %SOURCE%
- @p='%SOURCE%'; $(am__check_pre) %DRIVER% --test-name "$$f" \
- --log-file '%BASE%.log' --trs-file '%BASE%.trs' \
+ @p='%SOURCE%'; \
+## Another hack to support BSD make in parallel mode.
+?!GENERIC? b='%BASE%'; \
+?GENERIC? $(am__set_b); \
+ $(am__check_pre) %DRIVER% --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) %DRIVER_FLAGS% -- %COMPILE% \
"$$tst" $(AM_TESTS_FD_REDIRECT)
## conflict with the previous one.
if %am__EXEEXT%
?GENERIC?%EXT%$(EXEEXT).log:
- @p='%SOURCE%'; $(am__check_pre) %DRIVER% --test-name "$$f" \
- --log-file '%BASE%.log' --trs-file '%BASE%.trs' \
+ @p='%SOURCE%'; \
+ ## Another hack to support BSD make in parallel mode.
+?!GENERIC? b='%BASE%'; \
+?GENERIC? $(am__set_b); \
+ $(am__check_pre) %DRIVER% --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) %DRIVER_FLAGS% -- %COMPILE% \
"$$tst" $(AM_TESTS_FD_REDIRECT)
endif %am__EXEEXT%
# - concurrent parallel execution
am_parallel_tests=yes
-required=GNUmake
. ./defs || Exit 1
case $MAKE in
*\ -j*) skip_ "\$MAKE contains \`-j'";;
esac
+using_gmake || echo "all:" | $MAKE -f - -j4 all \
+ || skip_ "can't run make in parallel mode"
+
cat >> configure.in << 'END'
AC_OUTPUT
END
TESTS =
END
-for i in 1 2 3 4 5 6 7 8; do
- echo "TESTS += foo$i.test" >> Makefile.am
- unindent >foo$i.test <<'END'
- #! /bin/sh
- echo "this is $0"
- # Creative quoting below to please maintainer-check.
- sleep '1'
- exit 0
+cat > x <<'END'
+#! /bin/sh
+echo "this is $0"
+# Creative quoting below to please maintainer-check.
+sleep '1'
+exit 0
END
- chmod a+x foo$i.test
+chmod a+x ./x
+
+mkdir sub
+for i in 1 2 3; do
+ echo "TESTS += foo$i.test" >> Makefile.am
+ cp x foo$i.test
+ echo "TESTS += zap$i" >> Makefile.am
+ cp x zap$i
+ echo "TESTS += sub/bar$i.test" >> Makefile.am
+ cp x sub/bar$i.test
+ echo "TESTS += sub/mu$i" >> Makefile.am
+ cp x sub/mu$i
done
$ACLOCAL
# still be ongoing when the parallel one has terminated.
kill -0 $!
cat parallel/stdout
-test `grep -c '^PASS:' parallel/stdout` -eq 8
+test `grep -c '^PASS:' parallel/stdout` -eq 12
# Wait long enough so that there are no open files any more when the
# post-test cleanup runs. But exit after we've waited for two minutes