[PATCH] Do not run timezone tests in parallel.

Stefan Liebler stli@linux.vnet.ibm.com
Thu Apr 17 13:50:00 GMT 2014


On 04/16/2014 05:28 PM, Andreas Schwab wrote:
> That has nothing to do with parallel execution, but only with the fact
> that the pattern rule creates two targets with a single command, but it
> is unspecified which target triggers it.  There are no races involved.
>
> Andreas.
>

Yes you are right.
The rule creates two targets, should it create also two test-result 
files? The attached patch generates the second test-result file as a 
copy of the generated one.
Thus the testsuite can rely on the existence of the test-result files
regardless of which target has triggered the rule.

Is this the right way?
What is your idea?

Bye

---
2014-04-17  Stefan Liebler  <stli@linux.vnet.ibm.com>

	* timezone/Makefile (%/UTC %/Universal):
	Generate test-result files for UTC and Universal.
---

-------------- next part --------------
diff --git a/timezone/Makefile b/timezone/Makefile
index 998cd14..47129e8 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -106,6 +106,12 @@ $(testdata)/Etc/UTC: etcetera $(zic-deps)
 # Two separate targets built separately can collide if in parallel.
 %/UTC %/Universal: simplebackw $(zic-deps) %/Etc/UTC
 	$(build-testdata)
+	{ test -r $(@D)/Universal.test-result \
+	&& cp $(@D)/Universal.test-result $(@D)/UTC.test-result \
+	&& sed -i 's/Universal/UTC/' $(@D)/UTC.test-result ; exit 0; }
+	{ test -r $(@D)/UTC.test-result \
+	&& cp $(@D)/UTC.test-result $(@D)/Universal.test-result \
+	&& sed -i 's/UTC/Universal/' $(@D)/Universal.test-result ; exit 0; }
 $(testdata)/%/Berlin $(testdata)/%/London: europe $(zic-deps)
 	$(build-testdata)
 $(testdata)/Australia/Melbourne: australasia $(zic-deps)


More information about the Libc-alpha mailing list