OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace-storage commits / b58160b

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

Changed files (1) +4 -38

CMakeLists.txt +4 -38
……@@ -72,14 +72,6 @@ include(Summary)
7272# ===================================================================
7373# Check for existance of various required, optional packages.
7474
75# ----------------------------------------------------------
76# Needed for unit tests
77
78FIND_PACKAGE(Cxxtest)
79IF (NOT CXXTEST_FOUND)
80 MESSAGE(STATUS "CxxTest missing: needed for unit tests.")
81ENDIF (NOT CXXTEST_FOUND)
82
8375# ----------------------------------------------------------
8476# Guile Python and Cython
8577
……@@ -114,36 +106,10 @@ INCLUDE(OpenCogCython)
114106ADD_SUBDIRECTORY(cmake)
115107ADD_SUBDIRECTORY(opencog)
116108
117IF (CXXTEST_FOUND)
118 ADD_CUSTOM_TARGET(tests)
119 ADD_SUBDIRECTORY(tests EXCLUDE_FROM_ALL)
120 IF (CMAKE_BUILD_TYPE STREQUAL "Coverage")
121 # doing coverage stuff while running tests if this is the Coverage build
122 ADD_CUSTOM_TARGET(check
123 # TODO lcov should be found by cmake first
124 # TODO set it up so that we can pick to run coverage per test, or
125 # combined across all tests (the latter is MUCH faster). Use a define?
126 # There is coverage specific stuff in AddCxxTest.cmake now...
127 WORKING_DIRECTORY tests
128 COMMAND ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure $(ARGS)
129
130 # This script combines the coverage analysis of each test,
131 # then creates html in tests/lcov
132 # Note: this should now be run separately...
133 #COMMAND ${PROJECT_SOURCE_DIR}/scripts/combine_lcov.sh
134 COMMENT "Running tests with coverage..."
135 )
136 ELSE (CMAKE_BUILD_TYPE STREQUAL "Coverage")
137 # Coverage is disabled; test normally
138 ADD_CUSTOM_TARGET(check
139 DEPENDS tests
140 WORKING_DIRECTORY tests
141 COMMAND ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure $(ARGS)
142 COMMENT "Running tests..."
143 )
144 ENDIF (CMAKE_BUILD_TYPE STREQUAL "Coverage")
145
146ENDIF (CXXTEST_FOUND)
109# ----------------------------------------------------------
110# Unit tests
111INCLUDE(OpenCogTestOptions)
112OPENCOG_SETUP_TESTING()
147113
148114ADD_CUSTOM_TARGET(cscope
149115 COMMAND find opencog examples tests -name '*.cc' -o -name '*.h' -o -name '*.cxxtest' -o -name '*.scm' > ${CMAKE_SOURCE_DIR}/cscope.files