diff options
author | DJ Delorie <dj@redhat.com> | 2018-07-06 01:10:41 -0400 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2018-08-22 21:20:37 -0400 |
commit | 561b0bec4448f0302cb4915bf67c919bde4a1c57 (patch) | |
tree | a05c836bfe23e523ec7d357203e7b6599b287f98 /support/Makefile | |
parent | b35d3509caee04b2e196bb832138e4e4042347db (diff) | |
download | glibc-561b0bec4448f0302cb4915bf67c919bde4a1c57.tar.gz glibc-561b0bec4448f0302cb4915bf67c919bde4a1c57.tar.xz glibc-561b0bec4448f0302cb4915bf67c919bde4a1c57.zip |
Add test-in-container infrastructure.
* Makefile (testroot.pristine): New rules to initialize the test-in-container "testroot". * Makerules (all-testsuite): Add tests-container. * Rules (tests-expected): Add tests-container. (binaries-all-tests): Likewise. (tests-container): New, run these tests in the testroot container. * support/Makefile (others): Add *-container, support_paths.c, xmkdirp, and links-dso-program. * support/links-dso-program-c.c: New. * support/links-dso-program.cc: New. * support/test-container.c: New. * support/shell-container.c: New. * support/echo-container.c: New. * support/true-container.c: New. * support/xmkdirp.c: New. * support/xsymlink.c: New. * support/support_paths.c: New. * support/support.h: Add support paths prototypes. * support/xunistd.h: Add xmkdirp () and xsymlink (). * nss/tst-nss-test3.c: Convert to test-in-container. * nss/tst-nss-test3.root/: New.
Diffstat (limited to 'support/Makefile')
-rw-r--r-- | support/Makefile | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/support/Makefile b/support/Makefile index 9063046c23..b5fcb6ed86 100644 --- a/support/Makefile +++ b/support/Makefile @@ -54,6 +54,7 @@ libsupport-routines = \ support_format_netent \ support_isolate_in_subprocess \ support_openpty \ + support_paths \ support_quote_blob \ support_record_failure \ support_run_diff \ @@ -85,6 +86,7 @@ libsupport-routines = \ xmalloc \ xmemstream \ xmkdir \ + xmkdirp \ xmmap \ xmprotect \ xmunmap \ @@ -140,6 +142,7 @@ libsupport-routines = \ xsocket \ xstrdup \ xstrndup \ + xsymlink \ xsysconf \ xunlink \ xwaitpid \ @@ -152,6 +155,45 @@ ifeq ($(build-shared),yes) libsupport-inhibit-o += .o endif +CFLAGS-support_paths.c = \ + -DSRCDIR_PATH=\"`cd .. ; pwd`\" \ + -DOBJDIR_PATH=\"`cd $(objpfx)/..; pwd`\" \ + -DINSTDIR_PATH=\"$(prefix)\" \ + -DLIBDIR_PATH=\"$(libdir)\" + +ifeq (,$(CXX)) +LINKS_DSO_PROGRAM = links-dso-program-c +else +LINKS_DSO_PROGRAM = links-dso-program +LDLIBS-links-dso-program = -lstdc++ -lgcc_s +endif + +others: \ + $(objpfx)test-container \ + $(objpfx)shell-container \ + $(objpfx)echo-container \ + $(objpfx)true-container \ + $(objpfx)$(LINKS_DSO_PROGRAM) + +ifeq ($(build-programs),yes) +endif + +LDLIBS-test-container = $(libsupport) + +others += test-container +others-noinstall += test-container + +others += shell-container echo-container true-container +others-noinstall += shell-container echo-container true-container + +others += $(LINKS_DSO_PROGRAM) +others-noinstall += $(LINKS_DSO_PROGRAM) + +$(objpfx)test-container : $(libsupport) +$(objpfx)shell-container : $(libsupport) +$(objpfx)echo-container : $(libsupport) +$(objpfx)true-container : $(libsupport) + tests = \ README-testing \ tst-support-namespace \ |