setup_error: test unit with name 'free_test_function' registered multiple times
Hi Team, Greetings for the day. I apologies if this is a duplicate case which is already reported, but I am unable to find a suitable answer for this. I have installed boost(1.67.0.1) via brew, and created a simple unit test case as below. #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE super #include <boost/test/unit_test.hpp> using namespace boost::unit_test; std::string uri; std::string versionNum; BOOST_AUTO_TEST_CASE( free_test_function ) { BOOST_CHECK(true /* test assertion */); } *Compiled this code as below.* g++ obj/main.o -L /Library/PostgreSQL/9.6/lib -L /usr/local/lib -L /usr/local/opt/openssl/lib/ -o test_integration -lpq -lcpprest -lboost_regex-mt -lboost_system-mt -lboost_thread-mt -lssl -lcrypto -lboost_chrono-mt -lboost_log-mt -lboost_locale-mt -lboost_date_time-mt -lboost_program_options-mt -lboost_stacktrace_noop-mt -lboost_filesystem-mt -lboost_unit_test_framework-mt test integration installation is completed. *Got the error, while I execute the binary.* ./test_integration libc++abi.dylib: terminating with uncaught exception of type boost::unit_test::framework::setup_error: test unit with name 'free_test_function' registered multiple times [1] 59619 abort ./test_integration *I have tried to debug the binary, which execution is successful.* lldb -- ./pgBucket_integration (lldb) target create "./pgBucket_integration" Current executable set to './pgBucket_integration' (x86_64). (lldb) r Process 60066 launched: './pgBucket_integration' (x86_64) Running 1 test case... *** No errors detected Process 60066 exited with status = 0 (0x00000000) I would like to request you to guide me on what/where I am missing. *Below are my g++ version details.* $ g++ --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 8.1.0 (clang-802.0.42) Target: x86_64-apple-darwin16.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -- Regards, Dinesh manojadinesh.blogspot.com
Le 04/05/2018 à 14:49, dinesh kumar via Boost-users a écrit :
Hi Team, [snip]
Hi Team,
Greetings for the day.
I apologies if this is a duplicate case which is already reported, but I am unable to find a suitable answer for this.
I have installed boost(1.67.0.1 <http://1.67.0.1>) via brew, and created a simple unit test case as below.
#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE super #include <boost/test/unit_test.hpp <http://test.hpp>>
using namespace boost::unit_test;
std::string uri; std::string versionNum;
BOOST_AUTO_TEST_CASE( free_test_function ) { BOOST_CHECK(true /* test assertion */); }
_Compiled this code as below._
g++ obj/main.o -L /Library/PostgreSQL/9.6/lib -L /usr/local/lib -L /usr/local/opt/openssl/lib/ -o test_integration -lpq -lcpprest -lboost_regex-mt -lboost_system-mt -lboost_thread-mt -lssl -lcrypto -lboost_chrono-mt -lboost_log-mt -lboost_locale-mt -lboost_date_time-mt -lboost_program_options-mt -lboost_stacktrace_noop-mt -lboost_filesystem-mt -lboost_unit_test_framework-mt test integration installation is completed.
_Got the error, while I execute the binary._
./test_integration libc++abi.dylib <http://abi.dylib>: terminating with uncaught exception of typeboost::unit_test::framework::setup_error: test unit with name 'free_test_function' registered multiple times [1] 59619 abort ./test_integration _ _
In 1.67, a sanity check has been introduced, and this is fired exactly because of the reason mentioned. Now, it sounds like there are other files that are getting included in the build. For instance, the free_test_function is mentioned several times in the examples. Would you please rename the test to something else and check again? Otherwise, I have no clue what is going on. Raffi
Thank for the information Raffi. Sorry, I your email. I will try to reproduce the problem, and will give update here. Regards, Dinesh On Wed, Jun 27, 2018 at 1:07 AM, Raffi Enficiaud via Boost-users < boost-users@lists.boost.org> wrote:
Le 04/05/2018 à 14:49, dinesh kumar via Boost-users a écrit :
Hi Team, [snip]
Hi Team,
Greetings for the day.
I apologies if this is a duplicate case which is already reported, but I am unable to find a suitable answer for this.
I have installed boost(1.67.0.1 <http://1.67.0.1>) via brew, and created a simple unit test case as below.
#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE super #include <boost/test/unit_test.hpp <http://test.hpp>>
using namespace boost::unit_test;
std::string uri; std::string versionNum;
BOOST_AUTO_TEST_CASE( free_test_function ) { BOOST_CHECK(true /* test assertion */); }
_Compiled this code as below._
g++ obj/main.o -L /Library/PostgreSQL/9.6/lib -L /usr/local/lib -L /usr/local/opt/openssl/lib/ -o test_integration -lpq -lcpprest -lboost_regex-mt -lboost_system-mt -lboost_thread-mt -lssl -lcrypto -lboost_chrono-mt -lboost_log-mt -lboost_locale-mt -lboost_date_time-mt -lboost_program_options-mt -lboost_stacktrace_noop-mt -lboost_filesystem-mt -lboost_unit_test_framework-mt test integration installation is completed.
_Got the error, while I execute the binary._
./test_integration libc++abi.dylib <http://abi.dylib>: terminating with uncaught exception of typeboost::unit_test::framework::setup_error: test unit with name 'free_test_function' registered multiple times [1] 59619 abort ./test_integration _ _
In 1.67, a sanity check has been introduced, and this is fired exactly because of the reason mentioned.
Now, it sounds like there are other files that are getting included in the build. For instance, the free_test_function is mentioned several times in the examples.
Would you please rename the test to something else and check again? Otherwise, I have no clue what is going on.
Raffi
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Regards, Dinesh manojadinesh.blogspot.com
participants (2)
-
dinesh kumar
-
Raffi Enficiaud