[PATCH] Parallelized make check

Hello,

The attached patch adds the jcheck target equivalent to make check, but
that can run with a -j flag ($ make jcheck -jX).

It does not interfere with the regular check, but rather builds on top
of the check-one target: it first generates a list of tests to run using
RunLLVMTests, and then run those tests according to the supplied -j
flag, invoking the check-one target for each one of them.

One minor change is that the check-one target can take an absolute path
name for the test, and that the site.exp is not regenerated for the
check-one target.

The created log is called jrun.log, and the target will fail if there is
any XPASS or FAIL.

I haven't tested with objdir != srcdir.

Hope this helps,
Julien

jcheck.diff (4.41 KB)

Ok, that was broken. Attached is a smaller diff that should work in all
cases.

Julien

jcheck.diff (3.72 KB)

This sounds really cool Julien! Two questions: 1) does it preserve the checking that the existing tcl stuff does, which fails a test if any subcommand fails? 2) does this work with the nightly tester?

Thanks for working on this, 8x faster make check would be very nice :slight_smile:

-Chris

>> I haven't tested with objdir != srcdir.
>
> Ok, that was broken. Attached is a smaller diff that should work in
> all
> cases.

This sounds really cool Julien! Two questions: 1) does it preserve
the checking that the existing tcl stuff does, which fails a test if
any subcommand fails? 2) does this work with the nightly tester?

For 1), I think the check-one target used by jcheck doesn't change the
tcl logic: if any RUN line fails, the whole test fails.

For 2), I think the NewNightlyTest.pl script would require some small
changes, to invoke the jcheck target instead of check, pass the desired
-j flag, and also parse the log. I'll take a look. In any case, the
changes would only apply to the DejaGNU tests (llvm-test already works
fine with -jX).

Thanks for working on this, 8x faster make check would be very nice :slight_smile:

Well, thanks for the great LLVM stuff.

Julien

After people beat on this and live on it, would be nice to push it into check itself, if there are no down sides.

Here is an updated patch. It adds a -jcheck option to the
NewNightlyTest.pl script to invoke the jcheck target instead of check.

The jcheck targets now creates testrun.{log,sum} that look somewhat like
the original ones. I did a test run with the nightly server, it seems it
parsed the logs I sent correctly:
http://llvm.org/nightlytest/fulltest.php?machine=388&night=9813

Looking at the nightly server sources, it seems only the final report
with the total number of pass/xpass/fail/xfail is needed.

I slightly changed the Makefile so that the site.exp creation is always
done, even when check-one is invoked, like it was before.

Hope this helps,
Julien

jcheck.diff (5.68 KB)

For 2), I think the NewNightlyTest.pl script would require some small
changes, to invoke the jcheck target instead of check, pass the desired
-j flag, and also parse the log. I'll take a look. In any case, the
changes would only apply to the DejaGNU tests (llvm-test already works
fine with -jX).

Here is an updated patch. It adds a -jcheck option to the
NewNightlyTest.pl script to invoke the jcheck target instead of check.

Hi Julien,

This sounds great, please apply!

-Chris