From: Michael Andres Date: Fri, 10 Jul 2009 13:23:39 +0000 (+0200) Subject: Adapt to boost_unit_test_framework-1.38. X-Git-Tag: 6.10.1~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Flibzypp.git;a=commitdiff_plain;h=b26f156dd97dae634bfc224cc5d4e106d2c7e79c Adapt to boost_unit_test_framework-1.38. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a323ce5..8563bf4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ MACRO(ADD_TESTS) SET_SOURCE_FILES_PROPERTIES( ${loop_var}_test.cc COMPILE_FLAGS "-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN -DBOOST_AUTO_TEST_MAIN=\"\" " ) ADD_EXECUTABLE( ${loop_var}_test ${loop_var}_test.cc ) TARGET_LINK_LIBRARIES( ${loop_var}_test zypp boost_unit_test_framework zypp_test_utils) - ADD_TEST( ${loop_var}_test ${CMAKE_CURRENT_BINARY_DIR}/${loop_var}_test) + ADD_TEST( ${loop_var}_test ${CMAKE_CURRENT_BINARY_DIR}/${loop_var}_test --catch_system_errors=no) ENDFOREACH( loop_var ) ENDMACRO(ADD_TESTS) diff --git a/tests/README b/tests/README index 300e69a..38a246b 100644 --- a/tests/README +++ b/tests/README @@ -1,7 +1,29 @@ You can find here unit tests for lot of zypp classes. -run +run ctest . -or the binary itself to run just one test +or the binary itself to run just one test + + +Note on libboost_unit_test_framework.so.1.38.0 +---------------------------------------------- + +When you run the tests manually, some of the testcases here may fail +with an error message like: + + unknown location(0): \ + fatal error in "keyring_test": \ + child has exited; pid: 7222; uid: 216; exit value: 2 + +This happens because the boost test framework we use monitors the +return code of child processes. This monitoring should be turned off. + +You can do this either via a commandfline option: + + ./KeyRing_test --catch_system_errors=no + +Or via an environment variable: + + BOOST_TEST_CATCH_SYSTEM_ERRORS=no ./KeyRing_test