Adapt to boost_unit_test_framework-1.38.
authorMichael Andres <ma@suse.de>
Fri, 10 Jul 2009 13:23:39 +0000 (15:23 +0200)
committerMichael Andres <ma@suse.de>
Fri, 10 Jul 2009 13:23:39 +0000 (15:23 +0200)
CMakeLists.txt
tests/README

index a323ce5..8563bf4 100644 (file)
@@ -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)
 
index 300e69a..38a246b 100644 (file)
@@ -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