OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace-cog commits / 4407397

Remove cxxtest boilerplate
4407397ed6c560a983e369af0f7db752c2f24319
by Linas Vepstas <linasvepstas@gmail.com> · 2025-12-19T02:51:14.000Z

Changed files (1) +5 -44

CMakeLists.txt +5 -44
……@@ -108,14 +108,6 @@ ELSE (COGSERVER_FOUND)
108108 MESSAGE(STATUS "CogServer missing: needed for unit tests.")
109109ENDIF (COGSERVER_FOUND)
110110
111# ----------------------------------------------------------
112# Needed for unit tests
113
114FIND_PACKAGE(Cxxtest)
115IF (NOT CXXTEST_FOUND)
116 MESSAGE(STATUS "CxxTest missing: needed for unit tests.")
117ENDIF (NOT CXXTEST_FOUND)
118
119111# ----------------------------------------------------------
120112# Guile Python and Cython
121113
……@@ -153,42 +145,11 @@ INCLUDE(OpenCogGuile)
153145
154146ADD_SUBDIRECTORY(opencog)
155147
156IF (CXXTEST_FOUND)
157 ENABLE_TESTING()
158 ADD_CUSTOM_TARGET(tests)
159 ADD_SUBDIRECTORY(tests EXCLUDE_FROM_ALL)
160 IF (CMAKE_BUILD_TYPE STREQUAL "Coverage")
161 # doing coverage stuff while running tests if this is the Coverage build
162 ADD_CUSTOM_TARGET(test
163 # TODO lcov should be found by cmake first
164 # TODO set it up so that we can pick to run coverage per test, or
165 # combined across all tests (the latter is MUCH faster). Use a define?
166 # There is coverage specific stuff in AddCxxTest.cmake now...
167 WORKING_DIRECTORY tests
168 COMMAND ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure $(ARGS)
169
170 # This script combines the coverage analysis of each test,
171 # then creates html in tests/lcov
172 # Note: this should now be run separately...
173 #COMMAND ${PROJECT_SOURCE_DIR}/scripts/combine_lcov.sh
174 COMMENT "Running tests with coverage..."
175 )
176 ELSE (CMAKE_BUILD_TYPE STREQUAL "Coverage")
177 # If this is a build with coverage disabled then test normally
178 ADD_CUSTOM_TARGET(check
179 DEPENDS tests
180 WORKING_DIRECTORY tests
181 COMMAND ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure $(ARGS)
182 COMMENT "Running tests..."
183 )
184 ADD_CUSTOM_TARGET(test_storage
185 DEPENDS tests
186 WORKING_DIRECTORY tests/persist/cog-storage
187 COMMAND ${CMAKE_CTEST_COMMAND} $(ARGS)
188 COMMENT "Running tests..."
189 )
190 ENDIF (CMAKE_BUILD_TYPE STREQUAL "Coverage")
191ENDIF (CXXTEST_FOUND)
148# ----------------------------------------------------------
149# Unit tests
150INCLUDE(OpenCogTestOptions)
151OPENCOG_SETUP_TESTING()
152OPENCOG_ADD_TEST_TARGET(test_storage tests/persist/cog-storage "Running CogStorage tests...")
192153
193154ADD_CUSTOM_TARGET(cscope
194155 COMMAND find opencog examples tests -name '*.cc' -o -name '*.h' -o -name '*.cxxtest' -o -name '*.scm' > ${CMAKE_SOURCE_DIR}/cscope.files