With parallel builds enabled (e.g. via make -j 4 check or
MAKEFLAGS set to '-j 4'), the "tests" makefile schedules the download of
data/wingolog.pcap in parallel with the tests that depend on that file
(issue #244). This commit restricts the parallelism in tests/Makefile to
prevent this.
The following targets in tests/Makefile depend on data/wingolog.pcap:
check (via quickcheck, regression and its own rule)
quickcheck (via its own rules)
regression (via pflang_regression_tests and ir_regression_tests)
With parallel builds enabled, prior to this commit make $TARGET with
$TARGET set to any of the targets listed above is likely to fail if
data/wingolog.pcap has not been downloaded yet.
Using a trick taken from http://stackoverflow.com/a/8496739/3507119 the
download is forced to happen before any of the rules of the above
targets are executed. Instead of listing the download target
$TEST_SAVEFILE_URL as a prerequisite, the command
$(MAKE) $(TEST_SAVEFILE_URL)
has been prepended to each of the targets listed above. Now any of them
can be executed with parallel builds enabled.
I did not prepend this command to the rule for $IR_REGRESSION_TESTS and
$PFLANG_REGRESSION_TESTS because that seemed like overkill. Anyone who
executes a particular regression test directly probably already has
data/wingolog.pcap or will be able to read the error message that comes
up when that file is missing.
With parallel builds enabled (e.g. via
make -j 4 check
or MAKEFLAGS set to '-j 4'), the "tests" makefile schedules the download of data/wingolog.pcap in parallel with the tests that depend on that file (issue #244). This commit restricts the parallelism in tests/Makefile to prevent this.The following targets in tests/Makefile depend on data/wingolog.pcap:
With parallel builds enabled, prior to this commit
make $TARGET
with $TARGET set to any of the targets listed above is likely to fail if data/wingolog.pcap has not been downloaded yet.Using a trick taken from http://stackoverflow.com/a/8496739/3507119 the download is forced to happen before any of the rules of the above targets are executed. Instead of listing the download target $TEST_SAVEFILE_URL as a prerequisite, the command
has been prepended to each of the targets listed above. Now any of them can be executed with parallel builds enabled.
I did not prepend this command to the rule for $IR_REGRESSION_TESTS and $PFLANG_REGRESSION_TESTS because that seemed like overkill. Anyone who executes a particular regression test directly probably already has data/wingolog.pcap or will be able to read the error message that comes up when that file is missing.