OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace-rocks commits / 5e46bae

Reove cxxtest boilerplate
5e46bae73809042629696dd807f320f77d91cdb8
by Linas Vepstas <linasvepstas@gmail.com> · 2025-12-19T03:25:36.000Z

Changed files (1) +6 -54

CMakeLists.txt +6 -54
……@@ -92,14 +92,6 @@ ELSE (ROCKSDB_FOUND)
9292 MESSAGE(FATAL_ERROR "RocksDB was not found.")
9393ENDIF (ROCKSDB_FOUND)
9494
95# ----------------------------------------------------------
96# Needed for unit tests
97
98FIND_PACKAGE(Cxxtest)
99IF (NOT CXXTEST_FOUND)
100 MESSAGE(STATUS "CxxTest missing: needed for unit tests.")
101ENDIF (NOT CXXTEST_FOUND)
102
10395# ----------------------------------------------------------
10496# Guile Python and Cython
10597
……@@ -138,51 +130,12 @@ INCLUDE(OpenCogCython)
138130ADD_SUBDIRECTORY(cmake)
139131ADD_SUBDIRECTORY(opencog)
140132
141IF (CXXTEST_FOUND)
142 ENABLE_TESTING()
143 ADD_CUSTOM_TARGET(tests)
144 ADD_SUBDIRECTORY(tests EXCLUDE_FROM_ALL)
145 IF (CMAKE_BUILD_TYPE STREQUAL "Coverage")
146 # doing coverage stuff while running tests if this is the Coverage build
147 ADD_CUSTOM_TARGET(check
148 # TODO lcov should be found by cmake first
149 # TODO set it up so that we can pick to run coverage per test, or
150 # combined across all tests (the latter is MUCH faster). Use a define?
151 # There is coverage specific stuff in AddCxxTest.cmake now...
152 WORKING_DIRECTORY tests
153 COMMAND ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure $(ARGS)
154
155 # This script combines the coverage analysis of each test,
156 # then creates html in tests/lcov
157 # Note: this should now be run separately...
158 #COMMAND ${PROJECT_SOURCE_DIR}/scripts/combine_lcov.sh
159 COMMENT "Running tests with coverage..."
160 )
161 ELSE (CMAKE_BUILD_TYPE STREQUAL "Coverage")
162 # Coverage is disabled; test normally
163 ADD_CUSTOM_TARGET(check
164 DEPENDS tests
165 WORKING_DIRECTORY tests
166 COMMAND ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure $(ARGS)
167 COMMENT "Running tests..."
168 )
169 ENDIF (CMAKE_BUILD_TYPE STREQUAL "Coverage")
170
171 ADD_CUSTOM_TARGET(test_mono
172 DEPENDS tests
173 WORKING_DIRECTORY tests/persist/monospace
174 COMMAND ${CMAKE_CTEST_COMMAND} $(ARGS)
175 COMMENT "Running Monospace tests..."
176 )
177
178 ADD_CUSTOM_TARGET(test_multi
179 DEPENDS tests
180 WORKING_DIRECTORY tests/persist/rocks
181 COMMAND ${CMAKE_CTEST_COMMAND} $(ARGS)
182 COMMENT "Running Multispace tests..."
183 )
184
185ENDIF (CXXTEST_FOUND)
133INCLUDE(OpenCogTestOptions)
134OPENCOG_SETUP_TESTING()
135OPENCOG_ADD_TEST_TARGET(test_mono
136 tests/persist/monospace "Running Monospace tests...")
137OPENCOG_ADD_TEST_TARGET(test_multi
138 tests/persist/rocks "Running Multispace tests...")
186139
187140ADD_CUSTOM_TARGET(cscope
188141 COMMAND find opencog examples tests -name '*.cc' -o -name '*.h' -o -name '*.cxxtest' -o -name '*.scm' > ${CMAKE_SOURCE_DIR}/cscope.files
……@@ -242,7 +195,6 @@ FIND_PACKAGE(Doxygen)
242195# ===================================================================
243196# Show a summary of what we found, what we will do.
244197
245SUMMARY_ADD("AtomSpace-Rocks" "AtomSpace RocksDB Backend" HAVE_ROCKSDB)
246198SUMMARY_ADD("Cython" "Cython (python) bindings" HAVE_CYTHON)
247199SUMMARY_ADD("Doxygen" "Code documentation" DOXYGEN_FOUND)
248200SUMMARY_ADD("Unit tests" "Unit tests" CXXTEST_FOUND)