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.
This commit is contained in:
John Ralls
2018-07-27 15:15:57 -07:00
parent d6b245772e
commit accd154eb0
2 changed files with 18 additions and 1 deletions

View File

@@ -342,6 +342,17 @@ if (GNC_SRFI64_RESULT EQUAL 0)
set (HAVE_SRFI64 TRUE) set (HAVE_SRFI64 TRUE)
endif () 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) if (WITH_AQBANKING)
gnc_pkg_check_modules (GWENHYWFAR REQUIRED gwenhywfar) gnc_pkg_check_modules (GWENHYWFAR REQUIRED gwenhywfar)

View File

@@ -10,10 +10,13 @@ set(scm_test_with_srfi64_SOURCES
test-charts.scm test-charts.scm
test-transaction.scm test-transaction.scm
test-balance-sheet.scm test-balance-sheet.scm
test-stress-options.scm
test-income-gst.scm test-income-gst.scm
) )
set(scm_test_with_textual_ports_SOURCES
test-stress-options.scm
)
set(GUILE_DEPENDS set(GUILE_DEPENDS
scm-gnc-module scm-gnc-module
scm-app-utils scm-app-utils
@@ -28,6 +31,9 @@ set(GUILE_DEPENDS
if (HAVE_SRFI64) if (HAVE_SRFI64)
gnc_add_scheme_tests("${scm_test_with_srfi64_SOURCES}") 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) endif (HAVE_SRFI64)
gnc_add_scheme_tests("${scm_test_standard_reports_SOURCES}") gnc_add_scheme_tests("${scm_test_standard_reports_SOURCES}")