When using 'make parallel', one could sometimes observe an error due
to a race condition in creating the global _ocamltest repository used
by all new-style (ocamltest) tests. This commit removes the race by
making exec-one use local _ocamltest directories, one for each test
directory (the parallelism of the 'parallel' target is at the
granularity of each test directory, not each test file, so this
is safe)
On the contrary, the global 'new' and 'new-without-report' targets
still run all test in a global BASEDIR/_ocamltest directory. This
choice was done to minimize difference in behavior for users of these
targets, but it could be revisited in the future.
The `parallel` and `one DIR=...` targets currently do not work as
inteded for tests using the new 'ocamltest' framework: `one ...` has
no effect, and `parallel` only runs on old-style tests and ignores new
tests. This commit fixes this discrepancy in behavior.
This allows the client code to disable update of those fields, which
accounts for a significant amount of time spend in the generated code.
Perhaps this should rather be controlled more statically (to avoid a
runtime check -- but it is very cheap), by some directive in the lexer
specification itself (global, or on each rule).
Before this commit, ocamltest hooks could modify environment when they
succeded, but they were not able to report a reason when they returned a
skip or falure result.
This commit removes this limitation. To do so, the ocamltest_env variable
has been renamed to ocamltest_response.
When the hook returns a PASS result, the content of the ${ocamltest_response}
file is interpreted as a list of environment modifiers, as was the case for the content of
${ocamltest_env} before this commit.
However, from now on, the content of ${ocamltest_response} is also read
(as a string, which is trimmed), when the hook returns a skip or
failure result.
This string should describe why the hook returned the skip or fail result.