Skip to content

Commit

Permalink
Ensure that report unit tests dependencies are built with target.
Browse files Browse the repository at this point in the history
  • Loading branch information
jralls committed Oct 31, 2017
1 parent 039dda5 commit cbd8764
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
7 changes: 7 additions & 0 deletions common/cmake_modules/GncAddTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ FUNCTION(GNC_ADD_SCHEME_TEST _TARGET _SOURCE_FILE)
SET_TESTS_PROPERTIES(${_TARGET} PROPERTIES ENVIRONMENT "${GUILE_ENV};${ARGN}")
ENDFUNCTION()

FUNCTION(GNC_ADD_SCHEME_TESTS _SOURCE_FILES)
FOREACH(test_file ${_SOURCE_FILES})
GET_FILENAME_COMPONENT(basename ${test_file} NAME_WE)
GNC_ADD_SCHEME_TEST(${basename} ${test_file})
ENDFOREACH()
ENDFUNCTION()

FUNCTION(GNC_GTEST_CONFIGURE)
MESSAGE(STATUS "Checking for GTEST")
IF (NOT DEFINED ${GTEST_ROOT})
Expand Down
17 changes: 10 additions & 7 deletions gnucash/report/report-system/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ GNC_ADD_TEST_WITH_GUILE(test-link-module-report-system test-link-module.c
REPORT_SYSTEM_TEST_INCLUDE_DIRS REPORT_SYSTEM_TEST_LIBS
)

SET(scm_test_report_system_SOURCES
test-collectors.scm
test-list-extras.scm
test-report-utilities.scm
# test-test-extras.scm ;;Not run in autotools
)

GNC_ADD_SCHEME_TESTS(${scm_test_report_system_SOURCES})
GNC_ADD_SCHEME_TEST(test-load-module-report-system test-load-module.in)
GNC_ADD_SCHEME_TEST(test-collectors test-collectors.scm)
GNC_ADD_SCHEME_TEST(test-list-extras test-list-extras.scm)
GNC_ADD_SCHEME_TEST(test-report-utilities test-report-utilities.scm)
# This test is not run in the autotools build.
#GNC_ADD_SCHEME_TEST(test-test-extras test-test-extras.scm)

GNC_ADD_SCHEME_TARGETS(scm-test-report-system
test-extras.scm
"${scm_test_report_system_SOURCES};test-extras.scm"
gnucash/report/report-system/test
""
""
Expand All @@ -29,4 +32,4 @@ GNC_ADD_SCHEME_TARGETS(scm-test-report-system
CONFIGURE_FILE(test-load-module.in test-load-module @ONLY)

SET_DIST_LIST(test_report_system_DIST CMakeLists.txt Makefile.am test-collectors.scm test-extras.scm test-link-module.c
test-load-module.in test-report-utilities.scm test-list-extras.scm)
test-load-module.in test-report-utilities.scm test-list-extras.scm)
12 changes: 5 additions & 7 deletions gnucash/report/standard-reports/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
GNC_ADD_SCHEME_TEST(test-cash-flow test-cash-flow.scm)
GNC_ADD_SCHEME_TEST(test-cashflow-barchart test-cashflow-barchart.scm)
GNC_ADD_SCHEME_TEST(test-standard-category-report test-standard-category-report.scm)
GNC_ADD_SCHEME_TEST(test-standard-net-barchart test-standard-net-barchart.scm)
GNC_ADD_SCHEME_TEST(test-standard-net-linechart test-standard-net-linechart.scm)

SET(scm_test_standard_reports_SOURCES
test-cash-flow.scm
test-cashflow-barchart.scm
test-generic-category-report.scm
test-generic-net-barchart.scm
test-generic-net-linechart.scm
)

GNC_ADD_SCHEME_TESTS(${scm_test_standard_reports_SOURCES})

GNC_ADD_SCHEME_TARGETS(scm-test-standard-reports
"${scm_test_standard_reports_SOURCES}"
gnucash/report/standard-reports/test
""
""
""
"scm-gnc-module;scm-test-report-system"
"scm-gnc-module;scm-test-report-system;scm-standard-reports;scm-report-stylesheets-2"
FALSE
)

Expand Down

0 comments on commit cbd8764

Please sign in to comment.