Serialize the creation of the dice test's slices.

Without this, mmake -jN may try to create the slices in parallel. Since that
task involves moving trace counts files, whose names are unpredictable (they
include the process id), we do it by moving all files whose names fit the
associated a pattern. If more than one slice is being created at any one time,
this meant that one invocation of the mmake rule doing the moving can "steal"
the trace counts file from another.
This commit is contained in:
Zoltan Somogyi
2015-09-04 07:42:59 +10:00
parent 9a7a7d4e9c
commit 6b124de0a7

View File

@@ -346,12 +346,12 @@ dice.pass1: dice
MERCURY_OPTIONS=--trace-count ./dice 1 2 3 4 && \
mv .mercury_trace_counts.*dice.* dice.pass1
dice.pass2: dice
dice.pass2: dice dice.pass1
/bin/rm -f .mercury_trace_counts.*dice.*
MERCURY_OPTIONS=--trace-count ./dice 5 6 7 8 && \
mv .mercury_trace_counts.*dice.* dice.pass2
dice.pass3: dice
dice.pass3: dice dice.pass2
/bin/rm -f .mercury_trace_counts.*dice.*
MERCURY_OPTIONS=--trace-count ./dice 10 11 100 && \
mv .mercury_trace_counts.*dice.* dice.pass3
@@ -360,7 +360,7 @@ dice.passes: dice.pass1 dice.pass2 dice.pass3
MERCURY_OPTIONS= \
$(SLICE_DIR)mtc_union -o dice.passes dice.pass1 dice.pass2 dice.pass3
dice.fail: dice
dice.fail: dice dice.passes
/bin/rm -f .mercury_trace_counts.*dice.*
MERCURY_OPTIONS=--trace-count ./dice 4 1 2 3 && \
mv .mercury_trace_counts.*dice.* dice.fail