summary refs log tree commit diff
path: root/timezone
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.vnet.ibm.com>2015-06-19 13:47:59 +0200
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2015-06-19 13:47:59 +0200
commit86fe187471da743fa4bcf60cad7c04f8fbe010b7 (patch)
treea993712ecee75055bc77c033904f8a850731d996 /timezone
parent52e96362604ce295e7dcfa0ef4b317acb85696cf (diff)
downloadglibc-86fe187471da743fa4bcf60cad7c04f8fbe010b7.tar.gz
glibc-86fe187471da743fa4bcf60cad7c04f8fbe010b7.tar.xz
glibc-86fe187471da743fa4bcf60cad7c04f8fbe010b7.zip
Fix timezone tests run in parallel.
The Makefile rule is called one time for target %/UTC or %/Universal.
If the tests are run in parallel, UTC or Universal can trigger the rule.
This patch 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.

ChangeLog:

	* timezone/Makefile (%/UTC %/Universal):
	Generate test-result files for UTC and Universal.
Diffstat (limited to 'timezone')
-rw-r--r--timezone/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/timezone/Makefile b/timezone/Makefile
index 5f185458bc..24c93c6051 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -107,6 +107,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)