From 7b24cf6607dc96fbf260f955101e61a5053a34ad Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Tue, 19 Sep 2023 08:50:03 -0700 Subject: [PATCH] Cleanup self-include tests to `compile` solely as object files --- test/Jamfile.v2 | 37 ++++++++++--------- ...e_tests.cpp => self_include_tests_obj.cpp} | 4 +- 2 files changed, 20 insertions(+), 21 deletions(-) rename test/unordered/{self_include_tests.cpp => self_include_tests_obj.cpp} (70%) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 893b6fa0..1ab8ba6f 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -56,6 +56,25 @@ path-constant BOOST_UNORDERED_TEST_DIR : . ; run quick.cpp ; +local include_root = [ path.make $(TOP)/../include ] ; + +local headers = [ path.glob-tree $(include_root)/boost : *.hpp ] ; + +local paths ; +local sanitized_paths ; + +for local header in $(headers) +{ + local path = [ path.relative-to $(include_root) $(header) ] ; + local sanitized = [ regex.replace $(path) "[/.\\]" "_" ] ; + paths += $(path) ; + sanitized_paths += $(sanitized) ; + compile unordered/self_include_tests_obj.cpp + : BOOST_UNORDERED_HEADER="$(path)" : foa_$(sanitized)_self_include_tests ; +} + +alias foa_self_include_tests : foa_$(sanitized_paths)_self_include_tests ; + local FCA_TESTS = allocator_traits assign_tests @@ -279,24 +298,6 @@ for local container in $(MMAP_CONTAINERS) alias foa_mmap_tests : foa_mmap_$(MMAP_CONTAINERS)_tests ; -local include_root = [ path.make $(TOP)/../include ] ; - -local headers = [ path.glob-tree $(include_root)/boost : *.hpp ] ; - -local paths ; -local sanitized_paths ; - -for local header in $(headers) -{ - local path = [ path.relative-to $(include_root) $(header) ] ; - local sanitized = [ regex.replace $(path) "[/.\\]" "_" ] ; - paths += $(path) ; - sanitized_paths += $(sanitized) ; - run unordered/self_include_tests.cpp : : : BOOST_UNORDERED_HEADER="$(path)" : foa_$(sanitized)_self_include_tests ; -} - -alias foa_self_include_tests : foa_$(sanitized_paths)_self_include_tests ; - alias foa_tests : foa_$(FOA_TESTS) foa_$(FOA_EXCEPTION_TESTS) diff --git a/test/unordered/self_include_tests.cpp b/test/unordered/self_include_tests_obj.cpp similarity index 70% rename from test/unordered/self_include_tests.cpp rename to test/unordered/self_include_tests_obj.cpp index 1ea410ab..420dc3a9 100644 --- a/test/unordered/self_include_tests.cpp +++ b/test/unordered/self_include_tests_obj.cpp @@ -1,5 +1,5 @@ #ifndef BOOST_UNORDERED_HEADER -#error "this requires a class template be passed as a macro" +#error "this test requires a class template be passed as a macro" #endif #define STRINGIZE(text) STRINGIZE_I(text) @@ -7,5 +7,3 @@ #define HEADER STRINGIZE(BOOST_UNORDERED_HEADER) #include HEADER - -int main() {}