[LLVMdev] 2 experimental projects

Gabor Greif gabor at mac.com
Wed Mar 19 13:38:51 PDT 2008


 >> 1) Parallel "make check".
 >> Modelled after the successful clang "make test -jX" experiment, I am
 >> now bold enough to sink my teeth into the LLVM test suite.
 >> I have a prototype implementation, along the same lines, ready.
 >
 >Can you please explain this in detail.
 >
 >Thanks,
 >Tanya

Sure.

This is how "make test -j4" in clang works now:

The makefile locates all relevant test files inside
the specified test directories, that is files ending
with ".cpp", ".c" and ".m", synthesizes the targets
by appending ".testresults".

These targets are then built in parallel by a recursive
invocation of $(MAKE).

A build rule of form

Output/%.testresults: %

invokes the TestRunner.sh script.

Depending on the verbosity asked for, more or less
summary and error information is shown to the user.

My measurements on a 4-processor machine have
shown test time reduction of 60% when the tests were
invoked as "make test -j8".

In case of the llvm tests the situation is somewhat more
complicated, since dejagnu is driving the process, and
dejagnu hinders us in a direct $(MAKE) invocation, so
it falls back to -j1. My approach is thus using dejagnu
to build up makefiles in test/.../Output/... and when
these makefiles are executed by $(MAKE) we will
get the same output as before. Each of the makefiles
shall create the .testresults files just like clang tests do.

This is the plan.

Cheers,

	Gabor




More information about the llvm-dev mailing list