From accd154eb007b3fda2c3047fe92bfb22fd11a969 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Fri, 27 Jul 2018 15:15:57 -0700 Subject: [PATCH] Don't run test-stress-options.scm if no textual-ports. ice-9 textual ports, required by test-stress-options, was introduced in guile 2.2. We still support using guile-2.0. --- CMakeLists.txt | 11 +++++++++++ gnucash/report/standard-reports/test/CMakeLists.txt | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e10a09aa6..f5d372e775 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -342,6 +342,17 @@ if (GNC_SRFI64_RESULT EQUAL 0) set (HAVE_SRFI64 TRUE) endif () +# Test that guile has textual-ports. This is required for the stress test. +execute_process (COMMAND ${GUILE_EXECUTABLE} -c "(use-modules (ice-9 textual-ports))" + RESULT_VARIABLE GNC_TEXT_PORTS_RESULT + ERROR_QUIET +) + +if (GNC_TEXT_PORTS_RESULT EQUAL 0) + message (STATUS "Using guile textual-ports") + set (HAVE_TEXT_PORTS TRUE) +endif () + # ############################################################ if (WITH_AQBANKING) gnc_pkg_check_modules (GWENHYWFAR REQUIRED gwenhywfar) diff --git a/gnucash/report/standard-reports/test/CMakeLists.txt b/gnucash/report/standard-reports/test/CMakeLists.txt index ed2429164f..7fbdd4ff11 100644 --- a/gnucash/report/standard-reports/test/CMakeLists.txt +++ b/gnucash/report/standard-reports/test/CMakeLists.txt @@ -10,10 +10,13 @@ set(scm_test_with_srfi64_SOURCES test-charts.scm test-transaction.scm test-balance-sheet.scm - test-stress-options.scm test-income-gst.scm ) +set(scm_test_with_textual_ports_SOURCES + test-stress-options.scm +) + set(GUILE_DEPENDS scm-gnc-module scm-app-utils @@ -28,6 +31,9 @@ set(GUILE_DEPENDS if (HAVE_SRFI64) gnc_add_scheme_tests("${scm_test_with_srfi64_SOURCES}") + if (HAVE_TEXT_PORTS) + gnc_add_scheme_tests("${scm_test_with_textual_ports_SOURCES}") + endif (HAVE_TEXT_PORTS) endif (HAVE_SRFI64) gnc_add_scheme_tests("${scm_test_standard_reports_SOURCES}")