about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@redhat.com>2020-01-23 09:45:00 -0500
committerCarlos O'Donell <carlos@redhat.com>2020-04-30 16:28:07 -0400
commit033362cfd7e0e1dccd6c9a2642710d6e3a7e7007 (patch)
tree1666d081974a09309f0c57b2fed7603897ff4f6b /Makefile
parent19108a38325c6ecb33e8d216ee1056e2732bc20f (diff)
downloadglibc-033362cfd7e0e1dccd6c9a2642710d6e3a7e7007.tar.gz
glibc-033362cfd7e0e1dccd6c9a2642710d6e3a7e7007.tar.xz
glibc-033362cfd7e0e1dccd6c9a2642710d6e3a7e7007.zip
test-container: Support $(complocaledir) and mkdirp.
Expand the support infrastructure:
- Create $(complocaledir) in the testroot.pristine to support localedef.
- Add the variable $complocaledir to script support.
- Add the script command 'mkdirp'.

All localedef tests which run with default paths need to have the
$(complocaledir) created in testroot.pristine. The localedef binary
will not by itself create the default path, but it will write into
the path. By adding this we can simplify the localedef tests.

The variable $complocaledir is the value of the configured
$(complocaledir) which is the location of the compiled locales that
will be searched by the runtime by default.

The command mkdirp will be available in script setup and will
be equivalent to running `mkdir -p`.

The variable and command can be used to write more complex tests.

Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 8f0a93aceb..6dcfe40c25 100644
--- a/Makefile
+++ b/Makefile
@@ -588,6 +588,9 @@ $(objpfx)testroot.pristine/install.stamp :
 	# We need a working /bin/sh for some of the tests.
 	test -d $(objpfx)testroot.pristine/bin || \
 	  mkdir $(objpfx)testroot.pristine/bin
+	# We need the compiled locale dir for localedef tests.
+	test -d $(objpfx)testroot.pristine/$(complocaledir) || \
+	  mkdir -p $(objpfx)testroot.pristine/$(complocaledir)
 	cp $(objpfx)support/shell-container $(objpfx)testroot.pristine/bin/sh
 	cp $(objpfx)support/echo-container $(objpfx)testroot.pristine/bin/echo
 	cp $(objpfx)support/true-container $(objpfx)testroot.pristine/bin/true