Message ID | liom5p$b8e$2@ger.gmane.org |
---|---|
State | New |
Headers | show |
ping On 04/17/2014 03:49 PM, Stefan Liebler wrote: > 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. > --- >
On Thu, 17 Apr 2014, Stefan Liebler wrote: > 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. This patch <https://sourceware.org/ml/libc-alpha/2014-04/msg00359.html> is OK, please commit.
On Fri, Jun 12, 2015 at 08:59:10PM +0000, Joseph Myers wrote: > > 2014-04-17 Stefan Liebler <stli@linux.vnet.ibm.com> > > > > * timezone/Makefile (%/UTC %/Universal): > > Generate test-result files for UTC and Universal. > > This patch <https://sourceware.org/ml/libc-alpha/2014-04/msg00359.html> is > OK, please commit. Applied. Thanks! -Andreas-
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)