incubator-celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1528397 - in /incubator/celix/trunk: cmake/ examples/component_testing/client/ framework/ framework/private/test/ utils/ utils/private/test/
Date Wed, 02 Oct 2013 09:21:40 GMT
Author: abroekhuis
Date: Wed Oct  2 09:21:39 2013
New Revision: 1528397

URL: http://svn.apache.org/r1528397
Log:
CELIX-55: Small fixes to tests

Removed:
    incubator/celix/trunk/framework/private/test/test_activator.c
Modified:
    incubator/celix/trunk/cmake/Test.cmake
    incubator/celix/trunk/examples/component_testing/client/CMakeLists.txt
    incubator/celix/trunk/framework/CMakeLists.txt
    incubator/celix/trunk/framework/private/test/properties_test.cpp
    incubator/celix/trunk/utils/CMakeLists.txt
    incubator/celix/trunk/utils/private/test/hash_map_test.c

Modified: incubator/celix/trunk/cmake/Test.cmake
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/Test.cmake?rev=1528397&r1=1528396&r2=1528397&view=diff
==============================================================================
--- incubator/celix/trunk/cmake/Test.cmake (original)
+++ incubator/celix/trunk/cmake/Test.cmake Wed Oct  2 09:21:39 2013
@@ -15,6 +15,18 @@
 # specific language governing permissions and limitations
 # under the License.
 
+FUNCTION(ADD_TARGET_FOR_TEST _testrunner)
+	add_test(NAME ${_testrunner} 
+    			COMMAND ${_testrunner} -ojunit)
+    			
+	string(LENGTH ${_testrunner} length)
+	math(EXPR l "${length} - 5")
+	string(SUBSTRING ${_testrunner} 0 ${l} output)
+    		
+	GET_DIRECTORY_PROPERTY(PROPS ADDITIONAL_MAKE_CLEAN_FILES)	
+	SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROPS};${CMAKE_CURRENT_BINARY_DIR}/cpputest_${output}.xml")
+ENDFUNCTION() # ADD_TARGET_FOR_TEST
+
 include(FindCUnit)
 
 ADD_CUSTOM_TARGET(test_cunit)
@@ -34,20 +46,3 @@ MACRO(run_test)
 	)
 	ADD_DEPENDENCIES(test_cunit ${__testTarget})
 ENDMACRO(run_test)
-
-include(FindCppUTest)
-ADD_CUSTOM_TARGET(test_cppu)
-MACRO(run_cppu_test)
-    PARSE_ARGUMENTS(TEST "" "" ${ARGN})
-    LIST(GET TEST_DEFAULT_ARGS 0 EXEC)
-	
-	SET(__testTarget test_${EXEC})
-	
-	make_directory(${PROJECT_BINARY_DIR}/test_results)
-		
-	add_custom_target(${__testTarget}
-		${EXEC} "-ojunit" 
-		WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test_results
-	)
-	ADD_DEPENDENCIES(test_cppu ${__testTarget})
-ENDMACRO(run_cppu_test)
\ No newline at end of file

Modified: incubator/celix/trunk/examples/component_testing/client/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/examples/component_testing/client/CMakeLists.txt?rev=1528397&r1=1528396&r2=1528397&view=diff
==============================================================================
--- incubator/celix/trunk/examples/component_testing/client/CMakeLists.txt (original)
+++ incubator/celix/trunk/examples/component_testing/client/CMakeLists.txt Wed Oct  2 09:21:39
2013
@@ -28,4 +28,4 @@ include_directories(${PROJECT_SOURCE_DIR
 link_directories(${PROJECT_SOURCE_DIR}/cmake/cpputest/lib)
 add_executable(client_test private/test/client_test private/src/client_impl)
 target_link_libraries(client_test CppUTest CppUTestExt framework)
-run_cppu_test(client_test)
\ No newline at end of file
+ADD_TARGET_FOR_TEST(client_test)
\ No newline at end of file

Modified: incubator/celix/trunk/framework/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/CMakeLists.txt?rev=1528397&r1=1528396&r2=1528397&view=diff
==============================================================================
--- incubator/celix/trunk/framework/CMakeLists.txt (original)
+++ incubator/celix/trunk/framework/CMakeLists.txt Wed Oct  2 09:21:39 2013
@@ -73,215 +73,228 @@ if (FRAMEWORK) 
 
 	celix_subproject(FRAMEWORK_TESTS "Option to build the framework tests" "ON" DEPS)
     if (FRAMEWORK_TESTS)
-    #include_directories(${CUNIT_INCLUDE_DIRS})
-    include_directories(${CPPUTEST_INCLUDE_DIR})
-    include_directories(${CPPUTEST_EXT_INCLUDE_DIR})
-    
-    #add_executable(framework_test private/test/framework_test)
-    #target_link_libraries(framework_test celix_utils celix_framework ${CUNIT_LIBRARIES})
-    
-    add_executable(version_test private/test/version_test.cpp private/src/version.c)
-	target_link_libraries(version_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY})
-	
-	add_executable(version_range_test private/test/version_range_test.cpp private/src/version_range.c)
-	target_link_libraries(version_range_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY})
-	
-	add_executable(utils_test private/test/utils_test.cpp private/src/utils.c)
-	target_link_libraries(utils_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY})
-	
-	add_executable(service_tracker_test 
-		private/test/service_tracker_test.cpp 
-		private/mock/bundle_context_mock.c
-		private/mock/service_reference_mock.c 
-		private/mock/service_tracker_customizer_mock.c
-		private/src/service_tracker.c)
-	target_link_libraries(service_tracker_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(service_tracker_customizer_test 
-		private/test/service_tracker_customizer_test.cpp
-		private/mock/service_reference_mock.c
-		private/src/service_tracker_customizer.c) 
-	target_link_libraries(service_tracker_customizer_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY}
${CPPUTEST_EXT_LIBRARY} celix_utils)
-	
-	add_executable(service_registry_test 
-		private/test/service_registry_test.cpp
-		private/mock/framework_mock.c
-		private/mock/bundle_mock.c
-		private/mock/filter_mock.c
-		private/mock/service_reference_mock.c
-		private/mock/service_registration_mock.c
-		private/mock/properties_mock.c
-		private/src/service_registry.c) 
-	target_link_libraries(service_registry_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(service_registration_test 
-		private/test/service_registration_test.cpp
-		private/mock/properties_mock.c
-		private/mock/service_registry_mock.c
-		private/src/service_registration.c)
-	target_link_libraries(service_registration_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(service_reference_test 
-		private/test/service_reference_test.cpp
-		private/mock/service_registration_mock.c
-		private/mock/service_registry_mock.c
-		private/src/service_reference.c)
-	target_link_libraries(service_reference_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(resolver_test 
-		private/test/resolver_test.cpp
-		private/mock/bundle_mock.c
-		private/mock/requirement_mock.c
-		private/mock/capability_mock.c
-		private/mock/module_mock.c
-		private/mock/wire_mock.c
-		private/src/resolver.c)
-	target_link_libraries(resolver_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-    
-	add_executable(requirement_test 
-		private/test/requirement_test.cpp
-		private/mock/attribute_mock.c
-		private/mock/capability_mock.c
-		private/mock/version_range_mock.c
-		private/src/requirement.c)
-	target_link_libraries(requirement_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(properties_test 
-		private/test/properties_test.cpp
-		private/src/utils.c
-		private/src/properties.c)
-	target_link_libraries(properties_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(module_test 
-		private/test/module_test.cpp
-		private/mock/bundle_mock.c
-		private/mock/version_mock.c
-		private/mock/manifest_mock.c
-		private/mock/manifest_parser_mock.c
-		private/mock/capability_mock.c
-		private/mock/wire_mock.c
-		private/src/module.c)
-	target_link_libraries(module_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(manifest_test 
-		private/test/manifest_test.cpp
-		private/mock/properties_mock.c
-		private/src/utils.c
-		private/src/manifest.c)
-	target_link_libraries(manifest_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(manifest_parser_test 
-		private/test/manifest_parser_test.cpp
-		private/mock/attribute_mock.c
-		private/mock/manifest_mock.c
-		private/mock/capability_mock.c
-		private/mock/requirement_mock.c
-		private/mock/version_mock.c
-		private/src/utils.c
-		private/src/manifest_parser.c)
-	target_link_libraries(manifest_parser_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(framework_test 
-		private/test/framework_test.cpp
-		private/mock/properties_mock.c
-		private/mock/resolver_mock.c
-		private/mock/service_reference_mock.c
-		private/mock/service_registry_mock.c
-		private/mock/service_registration_mock.c
-		private/mock/filter_mock.c
-		private/mock/bundle_mock.c
-		private/mock/bundle_context_mock.c
-		private/mock/module_mock.c
-		private/mock/bundle_archive_mock.c
-		private/mock/bundle_revision_mock.c
-		private/mock/bundle_cache_mock.c
-		private/mock/manifest_mock.c
-		private/src/utils.c
-		private/src/framework.c)
-	target_link_libraries(framework_test ${APR_LIBRARY} ${APRUTIL_LIBRARY} ${CPPUTEST_LIBRARY}
${CPPUTEST_EXT_LIBRARY} celix_utils)
-	
-	add_executable(filter_test 
-		private/test/filter_test.cpp
-		private/mock/properties_mock.c
-		private/src/filter.c)
-	target_link_libraries(filter_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(capability_test 
-		private/test/capability_test.cpp
-		private/mock/attribute_mock.c
-		private/mock/version_mock.c
-		private/src/capability.c)
-	target_link_libraries(capability_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(bundle_test 
-		private/test/bundle_test.cpp
-		private/mock/framework_mock.c
-		private/mock/module_mock.c
-		private/mock/bundle_archive_mock.c
-		private/mock/resolver_mock.c
-		private/mock/version_mock.c
-		private/src/utils.c
-		private/src/bundle.c)
-	target_link_libraries(bundle_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(bundle_revision_test 
-		private/test/bundle_revision_test.cpp
-		private/mock/miniunz_mock.c
-		private/src/bundle_revision.c)
-	target_link_libraries(bundle_revision_test ${ZLIB_LIBRARY} ${APR_LIBRARY} ${CPPUTEST_LIBRARY}
${CPPUTEST_EXT_LIBRARY} celix_utils)
-	
-	add_executable(bundle_context_test 
-		private/test/bundle_context_test.cpp
-		private/mock/bundle_mock.c
-		private/mock/framework_mock.c
-		private/src/bundle_context.c)
-	target_link_libraries(bundle_context_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(bundle_cache_test 
-		private/test/bundle_cache_test.cpp
-		private/mock/bundle_archive_mock.c
-		private/mock/properties_mock.c
-		private/src/bundle_cache.c)
-	target_link_libraries(bundle_cache_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(bundle_archive_test 
-		private/test/bundle_archive_test.cpp
-		private/mock/bundle_revision_mock.c
-		private/src/bundle_archive.c)
-	target_link_libraries(bundle_archive_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-	add_executable(attribute_test 
-		private/test/attribute_test.cpp
-		private/src/attribute.c)
-	target_link_libraries(attribute_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
-	
-    #run_test(framework_test)
-    
-    #add_test(framework_test framework_test -ojunit)
-    #add_test(version_test version_test -ojunit)
-    #add_test(version_range_test version_range_test -ojunit)
-    
-	SETUP_TARGET_FOR_COVERAGE(version_test_c version_test ${CMAKE_BINARY_DIR}/coverage/version_test)
-	SETUP_TARGET_FOR_COVERAGE(version_range_test_c version_range_test ${CMAKE_BINARY_DIR}/coverage/version_range_test)
-	SETUP_TARGET_FOR_COVERAGE(service_tracker_test_c service_tracker_test ${CMAKE_BINARY_DIR}/coverage/service_tracker_test)
-	SETUP_TARGET_FOR_COVERAGE(service_tracker_customizer_test_c service_tracker_customizer_test
${CMAKE_BINARY_DIR}/coverage/service_tracker_customizer_test)
-	SETUP_TARGET_FOR_COVERAGE(service_registry_test_c service_registry_test ${CMAKE_BINARY_DIR}/coverage/service_registry_test)
-	SETUP_TARGET_FOR_COVERAGE(service_registration_test_c service_registration_test ${CMAKE_BINARY_DIR}/coverage/service_registration_test)
-	SETUP_TARGET_FOR_COVERAGE(service_reference_test_c service_reference_test ${CMAKE_BINARY_DIR}/coverage/service_reference_test)
-	SETUP_TARGET_FOR_COVERAGE(resolver_test_c resolver_test ${CMAKE_BINARY_DIR}/coverage/resolver_test)
-	SETUP_TARGET_FOR_COVERAGE(requirement_test_c requirement_test ${CMAKE_BINARY_DIR}/coverage/requirement_test)
-	SETUP_TARGET_FOR_COVERAGE(properties_test_c properties_test ${CMAKE_BINARY_DIR}/coverage/properties_test)
-	SETUP_TARGET_FOR_COVERAGE(module_test_c module_test ${CMAKE_BINARY_DIR}/coverage/module_test)
-	SETUP_TARGET_FOR_COVERAGE(manifest_test_c manifest_test ${CMAKE_BINARY_DIR}/coverage/manifest_test)
-	SETUP_TARGET_FOR_COVERAGE(manifest_parser_test_c manifest_parser_test ${CMAKE_BINARY_DIR}/coverage/manifest_parser_test)
-	SETUP_TARGET_FOR_COVERAGE(framework_test_c framework_test ${CMAKE_BINARY_DIR}/coverage/framework_test)
-	SETUP_TARGET_FOR_COVERAGE(filter_test_c filter_test ${CMAKE_BINARY_DIR}/coverage/filter_test)
-	SETUP_TARGET_FOR_COVERAGE(capability_test_c capability_test ${CMAKE_BINARY_DIR}/coverage/capability_test)
-	SETUP_TARGET_FOR_COVERAGE(bundle_test_c bundle_test ${CMAKE_BINARY_DIR}/coverage/bundle_test)
-	SETUP_TARGET_FOR_COVERAGE(bundle_revision_test_c bundle_revision_test ${CMAKE_BINARY_DIR}/coverage/bundle_revision_test)
-	SETUP_TARGET_FOR_COVERAGE(bundle_context_test_c bundle_context_test ${CMAKE_BINARY_DIR}/coverage/bundle_context_test)
-	SETUP_TARGET_FOR_COVERAGE(bundle_cache_test_c bundle_cache_test ${CMAKE_BINARY_DIR}/coverage/bundle_cache_test)
-	SETUP_TARGET_FOR_COVERAGE(bundle_archive_test_c bundle_archive_test ${CMAKE_BINARY_DIR}/coverage/bundle_archive_test)
-	SETUP_TARGET_FOR_COVERAGE(attribute_test_c attribute_test ${CMAKE_BINARY_DIR}/coverage/attribute_test)
+	    include_directories(${CPPUTEST_INCLUDE_DIR})
+	    include_directories(${CPPUTEST_EXT_INCLUDE_DIR})
+	    
+	    add_executable(version_test private/test/version_test.cpp private/src/version.c)
+		target_link_libraries(version_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY})
+		
+		add_executable(version_range_test private/test/version_range_test.cpp private/src/version_range.c)
+		target_link_libraries(version_range_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY})
+		
+		add_executable(utils_test private/test/utils_test.cpp private/src/utils.c)
+		target_link_libraries(utils_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY})
+		
+		add_executable(service_tracker_test 
+			private/test/service_tracker_test.cpp 
+			private/mock/bundle_context_mock.c
+			private/mock/service_reference_mock.c 
+			private/mock/service_tracker_customizer_mock.c
+			private/src/service_tracker.c)
+		target_link_libraries(service_tracker_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(service_tracker_customizer_test 
+			private/test/service_tracker_customizer_test.cpp
+			private/mock/service_reference_mock.c
+			private/src/service_tracker_customizer.c) 
+		target_link_libraries(service_tracker_customizer_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY}
${CPPUTEST_EXT_LIBRARY} celix_utils)
+		
+		add_executable(service_registry_test 
+			private/test/service_registry_test.cpp
+			private/mock/framework_mock.c
+			private/mock/bundle_mock.c
+			private/mock/filter_mock.c
+			private/mock/service_reference_mock.c
+			private/mock/service_registration_mock.c
+			private/mock/properties_mock.c
+			private/src/service_registry.c) 
+		target_link_libraries(service_registry_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(service_registration_test 
+			private/test/service_registration_test.cpp
+			private/mock/properties_mock.c
+			private/mock/service_registry_mock.c
+			private/src/service_registration.c)
+		target_link_libraries(service_registration_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(service_reference_test 
+			private/test/service_reference_test.cpp
+			private/mock/service_registration_mock.c
+			private/mock/service_registry_mock.c
+			private/src/service_reference.c)
+		target_link_libraries(service_reference_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(resolver_test 
+			private/test/resolver_test.cpp
+			private/mock/bundle_mock.c
+			private/mock/requirement_mock.c
+			private/mock/capability_mock.c
+			private/mock/module_mock.c
+			private/mock/wire_mock.c
+			private/src/resolver.c)
+		target_link_libraries(resolver_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+	    
+		add_executable(requirement_test 
+			private/test/requirement_test.cpp
+			private/mock/attribute_mock.c
+			private/mock/capability_mock.c
+			private/mock/version_range_mock.c
+			private/src/requirement.c)
+		target_link_libraries(requirement_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(properties_test 
+			private/test/properties_test.cpp
+			private/src/utils.c
+			private/src/properties.c)
+		target_link_libraries(properties_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(module_test 
+			private/test/module_test.cpp
+			private/mock/bundle_mock.c
+			private/mock/version_mock.c
+			private/mock/manifest_mock.c
+			private/mock/manifest_parser_mock.c
+			private/mock/capability_mock.c
+			private/mock/wire_mock.c
+			private/src/module.c)
+		target_link_libraries(module_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(manifest_test 
+			private/test/manifest_test.cpp
+			private/mock/properties_mock.c
+			private/src/utils.c
+			private/src/manifest.c)
+		target_link_libraries(manifest_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(manifest_parser_test 
+			private/test/manifest_parser_test.cpp
+			private/mock/attribute_mock.c
+			private/mock/manifest_mock.c
+			private/mock/capability_mock.c
+			private/mock/requirement_mock.c
+			private/mock/version_mock.c
+			private/src/utils.c
+			private/src/manifest_parser.c)
+		target_link_libraries(manifest_parser_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(framework_test 
+			private/test/framework_test.cpp
+			private/mock/properties_mock.c
+			private/mock/resolver_mock.c
+			private/mock/service_reference_mock.c
+			private/mock/service_registry_mock.c
+			private/mock/service_registration_mock.c
+			private/mock/filter_mock.c
+			private/mock/bundle_mock.c
+			private/mock/bundle_context_mock.c
+			private/mock/module_mock.c
+			private/mock/bundle_archive_mock.c
+			private/mock/bundle_revision_mock.c
+			private/mock/bundle_cache_mock.c
+			private/mock/manifest_mock.c
+			private/src/utils.c
+			private/src/framework.c)
+		target_link_libraries(framework_test ${APR_LIBRARY} ${APRUTIL_LIBRARY} ${CPPUTEST_LIBRARY}
${CPPUTEST_EXT_LIBRARY} celix_utils)
+		
+		add_executable(filter_test 
+			private/test/filter_test.cpp
+			private/mock/properties_mock.c
+			private/src/filter.c)
+		target_link_libraries(filter_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(capability_test 
+			private/test/capability_test.cpp
+			private/mock/attribute_mock.c
+			private/mock/version_mock.c
+			private/src/capability.c)
+		target_link_libraries(capability_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(bundle_test 
+			private/test/bundle_test.cpp
+			private/mock/framework_mock.c
+			private/mock/module_mock.c
+			private/mock/bundle_archive_mock.c
+			private/mock/resolver_mock.c
+			private/mock/version_mock.c
+			private/src/utils.c
+			private/src/bundle.c)
+		target_link_libraries(bundle_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(bundle_revision_test 
+			private/test/bundle_revision_test.cpp
+			private/mock/miniunz_mock.c
+			private/src/bundle_revision.c)
+		target_link_libraries(bundle_revision_test ${ZLIB_LIBRARY} ${APR_LIBRARY} ${CPPUTEST_LIBRARY}
${CPPUTEST_EXT_LIBRARY} celix_utils)
+		
+		add_executable(bundle_context_test 
+			private/test/bundle_context_test.cpp
+			private/mock/bundle_mock.c
+			private/mock/framework_mock.c
+			private/src/bundle_context.c)
+		target_link_libraries(bundle_context_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(bundle_cache_test 
+			private/test/bundle_cache_test.cpp
+			private/mock/bundle_archive_mock.c
+			private/mock/properties_mock.c
+			private/src/bundle_cache.c)
+		target_link_libraries(bundle_cache_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(bundle_archive_test 
+			private/test/bundle_archive_test.cpp
+			private/mock/bundle_revision_mock.c
+			private/src/bundle_archive.c)
+		target_link_libraries(bundle_archive_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+		
+		add_executable(attribute_test 
+			private/test/attribute_test.cpp
+			private/src/attribute.c)
+		target_link_libraries(attribute_test ${APR_LIBRARY} ${CPPUTEST_LIBRARY} ${CPPUTEST_EXT_LIBRARY}
celix_utils)
+	    
+	    ADD_TARGET_FOR_TEST(version_test)
+		ADD_TARGET_FOR_TEST(version_range_test)
+		ADD_TARGET_FOR_TEST(service_tracker_test)
+		ADD_TARGET_FOR_TEST(service_tracker_customizer_test)
+		ADD_TARGET_FOR_TEST(service_registry_test)
+		ADD_TARGET_FOR_TEST(service_registration_test)
+		ADD_TARGET_FOR_TEST(service_reference_test)
+		ADD_TARGET_FOR_TEST(resolver_test)
+		ADD_TARGET_FOR_TEST(requirement_test)
+		ADD_TARGET_FOR_TEST(properties_test)
+		ADD_TARGET_FOR_TEST(module_test)
+		ADD_TARGET_FOR_TEST(manifest_test)
+		ADD_TARGET_FOR_TEST(manifest_parser_test)
+		ADD_TARGET_FOR_TEST(framework_test)
+		ADD_TARGET_FOR_TEST(filter_test)
+		ADD_TARGET_FOR_TEST(capability_test)
+		ADD_TARGET_FOR_TEST(bundle_test)
+		ADD_TARGET_FOR_TEST(bundle_revision_test)
+		ADD_TARGET_FOR_TEST(bundle_context_test)
+		ADD_TARGET_FOR_TEST(bundle_cache_test)
+		ADD_TARGET_FOR_TEST(bundle_archive_test)
+		ADD_TARGET_FOR_TEST(attribute_test)
+	    
+		SETUP_TARGET_FOR_COVERAGE(version_test_c version_test ${CMAKE_BINARY_DIR}/coverage/version_test)
+		SETUP_TARGET_FOR_COVERAGE(version_range_test_c version_range_test ${CMAKE_BINARY_DIR}/coverage/version_range_test)
+		SETUP_TARGET_FOR_COVERAGE(service_tracker_test_c service_tracker_test ${CMAKE_BINARY_DIR}/coverage/service_tracker_test)
+		SETUP_TARGET_FOR_COVERAGE(service_tracker_customizer_test_c service_tracker_customizer_test
${CMAKE_BINARY_DIR}/coverage/service_tracker_customizer_test)
+		SETUP_TARGET_FOR_COVERAGE(service_registry_test_c service_registry_test ${CMAKE_BINARY_DIR}/coverage/service_registry_test)
+		SETUP_TARGET_FOR_COVERAGE(service_registration_test_c service_registration_test ${CMAKE_BINARY_DIR}/coverage/service_registration_test)
+		SETUP_TARGET_FOR_COVERAGE(service_reference_test_c service_reference_test ${CMAKE_BINARY_DIR}/coverage/service_reference_test)
+		SETUP_TARGET_FOR_COVERAGE(resolver_test_c resolver_test ${CMAKE_BINARY_DIR}/coverage/resolver_test)
+		SETUP_TARGET_FOR_COVERAGE(requirement_test_c requirement_test ${CMAKE_BINARY_DIR}/coverage/requirement_test)
+		SETUP_TARGET_FOR_COVERAGE(properties_test_c properties_test ${CMAKE_BINARY_DIR}/coverage/properties_test)
+		SETUP_TARGET_FOR_COVERAGE(module_test_c module_test ${CMAKE_BINARY_DIR}/coverage/module_test)
+		SETUP_TARGET_FOR_COVERAGE(manifest_test_c manifest_test ${CMAKE_BINARY_DIR}/coverage/manifest_test)
+		SETUP_TARGET_FOR_COVERAGE(manifest_parser_test_c manifest_parser_test ${CMAKE_BINARY_DIR}/coverage/manifest_parser_test)
+		SETUP_TARGET_FOR_COVERAGE(framework_test_c framework_test ${CMAKE_BINARY_DIR}/coverage/framework_test)
+		SETUP_TARGET_FOR_COVERAGE(filter_test_c filter_test ${CMAKE_BINARY_DIR}/coverage/filter_test)
+		SETUP_TARGET_FOR_COVERAGE(capability_test_c capability_test ${CMAKE_BINARY_DIR}/coverage/capability_test)
+		SETUP_TARGET_FOR_COVERAGE(bundle_test_c bundle_test ${CMAKE_BINARY_DIR}/coverage/bundle_test)
+		SETUP_TARGET_FOR_COVERAGE(bundle_revision_test_c bundle_revision_test ${CMAKE_BINARY_DIR}/coverage/bundle_revision_test)
+		SETUP_TARGET_FOR_COVERAGE(bundle_context_test_c bundle_context_test ${CMAKE_BINARY_DIR}/coverage/bundle_context_test)
+		SETUP_TARGET_FOR_COVERAGE(bundle_cache_test_c bundle_cache_test ${CMAKE_BINARY_DIR}/coverage/bundle_cache_test)
+		SETUP_TARGET_FOR_COVERAGE(bundle_archive_test_c bundle_archive_test ${CMAKE_BINARY_DIR}/coverage/bundle_archive_test)
+		SETUP_TARGET_FOR_COVERAGE(attribute_test_c attribute_test ${CMAKE_BINARY_DIR}/coverage/attribute_test)
 	endif (FRAMEWORK_TESTS)
 endif (FRAMEWORK)

Modified: incubator/celix/trunk/framework/private/test/properties_test.cpp
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/private/test/properties_test.cpp?rev=1528397&r1=1528396&r2=1528397&view=diff
==============================================================================
--- incubator/celix/trunk/framework/private/test/properties_test.cpp (original)
+++ incubator/celix/trunk/framework/private/test/properties_test.cpp Wed Oct  2 09:21:39 2013
@@ -61,7 +61,7 @@ TEST(properties, create) {
 }
 
 TEST(properties, load) {
-	char propertiesFile[] = "properties.txt";
+	char propertiesFile[] = "../../celix/framework/private/resources-test/properties.txt";
 	properties_pt properties = properties_load(propertiesFile);
 	LONGS_EQUAL(2, hashMap_size(properties));
 

Modified: incubator/celix/trunk/utils/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/CMakeLists.txt?rev=1528397&r1=1528396&r2=1528397&view=diff
==============================================================================
--- incubator/celix/trunk/utils/CMakeLists.txt (original)
+++ incubator/celix/trunk/utils/CMakeLists.txt Wed Oct  2 09:21:39 2013
@@ -50,30 +50,33 @@ if (UTILS) 
     FILE(GLOB files "public/include/*.h")
     INSTALL(FILES ${files} DESTINATION include/celix COMPONENT framework)
     
-    include_directories(${CUNIT_INCLUDE_DIRS})
-    include_directories(${CPPUTEST_INCLUDE_DIR})
-    include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-    include_directories("${PROJECT_SOURCE_DIR}/utils/private/include")
-    
-    add_executable(hash_map_test private/test/hash_map_test.c)
-    target_link_libraries(hash_map_test celix_utils ${CUNIT_LIBRARIES})
-    
-    add_executable(hash_map_test_hash private/test/hash_map_test_hash.c)
-    target_link_libraries(hash_map_test_hash celix_utils ${CUNIT_LIBRARIES})
-    
-    add_executable(array_list_test2 private/test/array_list_test.c)
-    target_link_libraries(array_list_test2 celix_utils ${CUNIT_LIBRARIES})
-    
-    add_executable(array_list_test private/test/array_list_test.cpp)
-	target_link_libraries(array_list_test celix_utils ${CPPUTEST_LIBRARY})
-    
-    add_executable(linked_list_test private/test/linked_list_test.c)
-    target_link_libraries(linked_list_test celix_utils ${CUNIT_LIBRARIES})
-    
-    run_test(array_list_test)
-    run_test(hash_map_test)
-    run_test(hash_map_test_hash)
-    run_test(linked_list_test)
-    
-    add_test(array_list_test array_list_test -ojunit)
+    celix_subproject(UTILS-TESTS "Option to build the utilities library" "ON")
+    if (UTILS-TESTS)
+	    include_directories(${CUNIT_INCLUDE_DIRS})
+	    include_directories(${CPPUTEST_INCLUDE_DIR})
+	    include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
+	    include_directories("${PROJECT_SOURCE_DIR}/utils/private/include")
+	    
+	    add_executable(hash_map_test private/test/hash_map_test.c)
+	    target_link_libraries(hash_map_test celix_utils ${CUNIT_LIBRARIES})
+	    
+	    add_executable(hash_map_test_hash private/test/hash_map_test_hash.c)
+	    target_link_libraries(hash_map_test_hash celix_utils ${CUNIT_LIBRARIES})
+	    
+	    add_executable(array_list_test2 private/test/array_list_test.c)
+	    target_link_libraries(array_list_test2 celix_utils ${CUNIT_LIBRARIES})
+	    
+	    add_executable(array_list_test private/test/array_list_test.cpp)
+		target_link_libraries(array_list_test celix_utils ${CPPUTEST_LIBRARY})
+	    
+	    add_executable(linked_list_test private/test/linked_list_test.c)
+	    target_link_libraries(linked_list_test celix_utils ${CUNIT_LIBRARIES})
+	    
+	    run_test(array_list_test2)
+	    run_test(hash_map_test)
+	    run_test(hash_map_test_hash)
+	    run_test(linked_list_test)
+	    
+	    ADD_TARGET_FOR_TEST(array_list_test)
+    endif(UTILS-TESTS)
 endif (UTILS)

Modified: incubator/celix/trunk/utils/private/test/hash_map_test.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/private/test/hash_map_test.c?rev=1528397&r1=1528396&r2=1528397&view=diff
==============================================================================
--- incubator/celix/trunk/utils/private/test/hash_map_test.c (original)
+++ incubator/celix/trunk/utils/private/test/hash_map_test.c Wed Oct  2 09:21:39 2013
@@ -24,6 +24,7 @@
  *  \copyright	Apache License, Version 2.0
  */
 #include <stdio.h>
+#include <stdlib.h>
 #include <CUnit/Automated.h>
 #include <stddef.h>
 



Mime
View raw message