File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44/builds /autoconf /
55! /builds /autoconf /m4 /m4_ax_pkg_check_modules.m4
66/liblcf- * /
7- /tests /* .log
8- /tests /* .trs
9- /time_stamp *
7+ /test_runner *
108.deps /
119.libs /
1210.dirstamp
@@ -20,7 +18,6 @@ configure
2018liblcf- * .tar.gz
2119libtool
2220stamp-h1
23- test-suite.log
2421* .la
2522* .lo
2623
@@ -57,5 +54,4 @@ Makefile
5754* .pc
5855
5956# tests
60- /tests /time_stamp *
61- ! /tests /time_stamp.cpp
57+ /tests /test_runner *
Original file line number Diff line number Diff line change @@ -193,18 +193,22 @@ pkginclude_HEADERS = \
193193 src/generated/rpg_trooppage.h \
194194 src/generated/rpg_variable.h
195195
196- check_PROGRAMS = time_stamp
197- TESTS = time_stamp
198- time_stamp_SOURCES = tests/time_stamp.cpp
199- time_stamp_CPPFLAGS = \
196+ check_PROGRAMS = test_runner
197+ test_runner_SOURCES = \
198+ tests/time_stamp.cpp \
199+ tests/test_main.cpp
200+ test_runner_CPPFLAGS = \
200201 -I$(srcdir ) /src \
201202 -I$(srcdir ) /src/generated
202- time_stamp_CXXFLAGS = \
203+ test_runner_CXXFLAGS = \
203204 -std=c++11 \
204205 $(EXPAT_CXXFLAGS ) \
205206 $(ICU_CXXFLAGS )
206- time_stamp_LDADD = \
207+ test_runner_LDADD = \
207208 liblcf.la \
208209 $(EXPAT_LIBS ) \
209210 $(ICU_LIBS )
210- time_stamp_LDFLAGS = -no-install
211+ test_runner_LDFLAGS = -no-install
212+
213+ check-local :
214+ $(AM_V_at ) ./test_runner
Original file line number Diff line number Diff line change @@ -83,22 +83,10 @@ install(FILES ${CMAKE_BINARY_DIR}/liblcf.pc
8383 DESTINATION ${LIB_INSTALL_DIR} /pkgconfig)
8484
8585# test
86- enable_testing ()
87-
8886include_directories (${CMAKE_CURRENT_SOURCE_DIR} /../../src )
8987
90- function (CXX_TEST target libs )
91- get_filename_component (name ${target} NAME_WE )
92- add_executable (test_${name} ${target} )
93- target_link_libraries (test_${name} ${PROJECT_NAME} ${libs} )
94- add_test (
95- NAME test_${name}
96- WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
97- COMMAND ${EXECUTABLE_OUTPUT_PATH} /test_${name} )
98- add_dependencies (test_${name} ${PROJECT_NAME} )
99- endfunction ()
100-
10188file (GLOB TEST_FILES ${CMAKE_CURRENT_SOURCE_DIR} /../../tests/*.cpp )
102- foreach (i ${TEST_FILES} )
103- cxx_test (${i} ${ICU_LIBRARIES} ${EXPAT_LIBRARY} )
104- endforeach ()
89+ add_executable (test_runner EXCLUDE_FROM_ALL ${TEST_FILES} )
90+ target_link_libraries (test_runner ${PROJECT_NAME} ${ICU_LIBRARIES} ${EXPAT_LIBRARY} )
91+ add_custom_target (check COMMAND ${EXECUTABLE_OUTPUT_PATH} /test_runner )
92+ add_dependencies (check test_runner )
You can’t perform that action at this time.
0 commit comments