From b8e57320d6ace52f3ca04628f16af58c9fd9e62b Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Mon, 22 Jan 2024 16:17:35 +0300 Subject: [PATCH 1/2] Update test generator to avoid using removed Boost.Filesystem APIs. The previously deprecated Boost.Filesystem APIs are now removed. This commit updates test generator to use the up-to-date replacement APIs. --- tools/generate.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/tools/generate.cpp b/tools/generate.cpp index 01b735970..a8595fbc5 100644 --- a/tools/generate.cpp +++ b/tools/generate.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -267,10 +268,10 @@ void process_ipp_file(const fs::path& file, bool positive_test) // get the output filesnames: boost::regex file_regex("boost_([^.]+)\\.ipp"); - positive_file = file.branch_path() / boost::regex_replace(file.leaf().string(), file_regex, "$1_pass.cpp"); - negative_file = file.branch_path() / boost::regex_replace(file.leaf().string(), file_regex, "$1_fail.cpp"); - write_test_file(positive_file, macro_name, namespace_name, file.leaf().string(), positive_test, true); - write_test_file(negative_file, macro_name, namespace_name, file.leaf().string(), positive_test, false); + positive_file = file.parent_path() / boost::regex_replace(file.filename().string(), file_regex, "$1_pass.cpp"); + negative_file = file.parent_path() / boost::regex_replace(file.filename().string(), file_regex, "$1_fail.cpp"); + write_test_file(positive_file, macro_name, namespace_name, file.filename().string(), positive_test, true); + write_test_file(negative_file, macro_name, namespace_name, file.filename().string(), positive_test, false); // always create config_test data, // positive and negative tests go to separate streams, because for some @@ -280,7 +281,7 @@ void process_ipp_file(const fs::path& file, bool positive_test) if(!positive_test) *pout << "n"; *pout << "def " << macro_name - << "\n#include \"" << file.leaf().string() << "\"\n#else\nnamespace " + << "\n#include \"" << file.filename().string() << "\"\n#else\nnamespace " << namespace_name << " = empty_boost;\n#endif\n"; config_test2 << " if(0 != " << namespace_name << "::test())\n" @@ -291,12 +292,12 @@ void process_ipp_file(const fs::path& file, bool positive_test) // always generate the jamfile data: jamfile << "test-suite \"" << macro_name << "\" : \n" - "[ run " << positive_file.leaf().string() << "