On 05/15/2015 12:24 AM, Arthur Schwarz wrote:
And as a simple question, why are you using "make -j8"? Shouldn't this
be part of the automake generated test code?
The short answer is because I wanna use 8 cpus. There is no sensible way
Automake can know how many cpus I wanna use.
$ make check TESTSUITEFLAGS=-j8
I just searched the Automake.html manual and can't find TESTSUITEFLAGS.
Where is this documented? Is this part of a new release?

Unlike Serial Test Harness execution, the Parallel Test Harness does not
output how it executes its tests. No way to find out what's under the hood
without checking the code.

I haven't looked at the Makefile source - mainly, I suspect, because I'm not
a make guru (or even an aficionado). My guess was that The Makefile directed
test execution was either:

    make -j# $(TESTS)   or
for I in $(TESTS); do make -j $i; done

Your guess is wrong. The key line in 'Makefile.in' is

$(TEST_SUITE_LOG): $(TEST_LOGS)

which means that before creating 'test-suite.log' the log file for each test is generated. This structure *allows* parallel execution, but only if the user chooses to. If the user run make single-threaded the test suite will be run on a single cpu. This is by design. If a user issues 'make check' you want one single cpu to be used; it would be very annoying if make spawned away processes. If a user issues 'make -jX' then the structure allows make to run tests in parallel. This is not possible in the old serial test suite, which basically just ran the tests in a loop.

Cheers,
Peter

Reply via email to