gnucash unstable: Ensure that report unit tests dependencies are built with target.
John Ralls
jralls at code.gnucash.org
Tue Oct 31 14:19:51 EDT 2017
Updated via https://github.com/Gnucash/gnucash/commit/cbd87647 (commit)
from https://github.com/Gnucash/gnucash/commit/039dda52 (commit)
commit cbd87647806ca3700d2ead8a6623b758a07ba2a7
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Oct 31 10:59:12 2017 -0700
Ensure that report unit tests dependencies are built with target.
diff --git a/common/cmake_modules/GncAddTest.cmake b/common/cmake_modules/GncAddTest.cmake
index e3df3af..fa8a8c5 100644
--- a/common/cmake_modules/GncAddTest.cmake
+++ b/common/cmake_modules/GncAddTest.cmake
@@ -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})
diff --git a/gnucash/report/report-system/test/CMakeLists.txt b/gnucash/report/report-system/test/CMakeLists.txt
index 0b0a05a..0beae99 100644
--- a/gnucash/report/report-system/test/CMakeLists.txt
+++ b/gnucash/report/report-system/test/CMakeLists.txt
@@ -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
""
""
@@ -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)
\ No newline at end of file
+ test-load-module.in test-report-utilities.scm test-list-extras.scm)
diff --git a/gnucash/report/standard-reports/test/CMakeLists.txt b/gnucash/report/standard-reports/test/CMakeLists.txt
index 7be4c9c..6233372 100644
--- a/gnucash/report/standard-reports/test/CMakeLists.txt
+++ b/gnucash/report/standard-reports/test/CMakeLists.txt
@@ -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
)
Summary of changes:
common/cmake_modules/GncAddTest.cmake | 7 +++++++
gnucash/report/report-system/test/CMakeLists.txt | 17 ++++++++++-------
gnucash/report/standard-reports/test/CMakeLists.txt | 12 +++++-------
3 files changed, 22 insertions(+), 14 deletions(-)
More information about the gnucash-changes
mailing list