It is similar to test-container, but build with -MODULE_NAME=nonlib
(similar to test-internal).
---
Makefile | 2 +-
Makerules | 3 ++-
Rules | 12 +++++++-----
3 files changed, 10 insertions(+), 7 deletions(-)
@@ -589,7 +589,7 @@ else
LINKS_DSO_PROGRAM = links-dso-program
endif
-$(tests-container) $(addsuffix /tests,$(subdirs)) : \
+$(tests-container) $(tests-container-internal) $(addsuffix /tests,$(subdirs)) : \
$(objpfx)testroot.pristine/install.stamp
$(objpfx)testroot.pristine/install.stamp :
test -d $(objpfx)testroot.pristine || \
@@ -1290,7 +1290,7 @@ xcheck: xtests
# that almost all internal declarations from config.h, libc-symbols.h, and
# include/*.h are not available to 'testsuite' code, but are to 'nonlib' code.
all-testsuite := $(strip $(tests) $(xtests) $(test-srcs) $(test-extras) \
- $(tests-container))
+ $(tests-container) $(tests-container-internal))
ifneq (,$(all-testsuite))
cpp-srcs-left = $(all-testsuite)
lib := testsuite
@@ -1298,6 +1298,7 @@ include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
endif
all-nonlib := $(strip $(tests-internal) $(test-internal-extras) \
+ $(tests-container-internal) \
$(others) $(others-extras))
ifneq (,$(all-nonlib))
cpp-srcs-left = $(all-nonlib)
@@ -148,13 +148,15 @@ others: $(py-const)
ifeq ($(run-built-tests),no)
tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported), \
$(tests) $(tests-internal) \
- $(tests-container)) \
+ $(tests-container) \
+ $(tests-container-internal)) \
$(test-srcs)) $(tests-special) \
$(tests-printers-programs)
xtests: tests $(xtests-special)
else
tests: $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \
$(tests-container:%=$(objpfx)%.out) \
+ $(tests-container-internal:%=$(objpfx)%.out) \
$(tests-mcheck:%=$(objpfx)%-mcheck.out) \
$(tests-special) $(tests-printers-out)
xtests: tests $(xtests:%=$(objpfx)%.out) $(xtests-special)
@@ -166,7 +168,7 @@ ifeq ($(run-built-tests),no)
tests-expected =
else
tests-expected = $(tests) $(tests-internal) $(tests-printers) \
- $(tests-container) $(tests-mcheck:%=%-mcheck)
+ $(tests-container) $(tests-container-internal) $(tests-mcheck:%=%-mcheck)
endif
tests:
$(..)scripts/merge-test-results.sh -s $(objpfx) $(subdir) \
@@ -180,7 +182,7 @@ xtests:
ifeq ($(build-programs),yes)
binaries-all-notests = $(others) $(sysdep-others)
binaries-all-tests = $(tests) $(tests-internal) $(xtests) $(test-srcs) \
- $(tests-container)
+ $(tests-container) $(tests-container-internal)
binaries-all = $(binaries-all-notests) $(binaries-all-tests)
binaries-static-notests = $(others-static)
binaries-static-tests = $(tests-static) $(xtests-static)
@@ -289,8 +291,8 @@ $(objpfx)%.out: /dev/null $(objpfx)% # Make it 2nd arg for canned sequence.
# Any tests that require an isolated container (filesystem, network
# and pid namespaces) in which to run, should be added to
-# tests-container.
-$(tests-container:%=$(objpfx)%.out): $(objpfx)%.out : $(if $(wildcard $(objpfx)%.files),$(objpfx)%.files,/dev/null) $(objpfx)%
+# tests-container or tests-container-internal.
+$(tests-container:%=$(objpfx)%.out) $(tests-container-internal:%=$(objpfx)%.out): $(objpfx)%.out : $(if $(wildcard $(objpfx)%.files),$(objpfx)%.files,/dev/null) $(objpfx)%
$(test-wrapper-env) $(run-program-env) $(run-via-rtld-prefix) \
$(common-objpfx)support/test-container env $(run-program-env) $($*-ENV) \
$(host-test-program-cmd) $($*-ARGS) > $@; \