gnu: gnucash: Disable the stress-options-test using a phase.

The qof test is also reinstated; it was failing because the needed locales
were not installed.

* gnu/packages/patches/gnucash-disable-failing-tests.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Unregister it.
* gnu/packages/gnucash.scm (gnucash)[patches]: Remove it.
[phases]{disable-stress-options-test}: Implement it using SUBSTITUTES*.
{install-locales}: New phase.
This commit is contained in:
Maxim Cournoyer 2019-01-03 18:28:56 -05:00
parent 7c8ea31ac9
commit a2e7e95663
No known key found for this signature in database
GPG key ID: 1260E46482E63562
3 changed files with 16 additions and 42 deletions

View file

@ -831,7 +831,6 @@ dist_patch_DATA = \
%D%/packages/patches/gmp-faulty-test.patch \ %D%/packages/patches/gmp-faulty-test.patch \
%D%/packages/patches/gnome-todo-libical-compat.patch \ %D%/packages/patches/gnome-todo-libical-compat.patch \
%D%/packages/patches/gnome-tweak-tool-search-paths.patch \ %D%/packages/patches/gnome-tweak-tool-search-paths.patch \
%D%/packages/patches/gnucash-disable-failing-tests.patch \
%D%/packages/patches/gnucash-fix-test-transaction-failure.patch \ %D%/packages/patches/gnucash-fix-test-transaction-failure.patch \
%D%/packages/patches/gnutls-skip-trust-store-test.patch \ %D%/packages/patches/gnutls-skip-trust-store-test.patch \
%D%/packages/patches/gnutls-skip-pkgconfig-test.patch \ %D%/packages/patches/gnutls-skip-pkgconfig-test.patch \

View file

@ -60,8 +60,7 @@ (define-public gnucash
(sha256 (sha256
(base32 (base32
"0grr5qi5rn1xvr7qx5d7mcxa2mcgycy2b325ry73bb485a6yv5l3")) "0grr5qi5rn1xvr7qx5d7mcxa2mcgycy2b325ry73bb485a6yv5l3"))
(patches (search-patches "gnucash-disable-failing-tests.patch" (patches (search-patches "gnucash-fix-test-transaction-failure.patch"))))
"gnucash-fix-test-transaction-failure.patch"))))
(build-system cmake-build-system) (build-system cmake-build-system)
(inputs (inputs
`(("guile" ,guile-2.2) `(("guile" ,guile-2.2)
@ -125,6 +124,21 @@ (define-public gnucash
(substitute* "libgnucash/scm/price-quotes.scm" (substitute* "libgnucash/scm/price-quotes.scm"
(("\"perl\" \"-w\" ") "")) (("\"perl\" \"-w\" ") ""))
#t)) #t))
;; The test-stress-options unit test is known to fail, so we disable
;; it (see: https://bugs.gnucash.org/show_bug.cgi?id=796877).
(add-after 'unpack 'disable-stress-options-test
(lambda _
(substitute* "gnucash/report/standard-reports/test/CMakeLists.txt"
(("test-stress-options.scm") ""))
#t))
;; The qof test requires the en_US, en_GB, and fr_FR locales.
(add-before 'check 'install-locales
(lambda _
(setenv "LOCPATH" (getcwd))
(invoke "localedef" "-i" "en_US" "-f" "UTF-8" "./en_US.UTF-8")
(invoke "localedef" "-i" "en_GB" "-f" "UTF-8" "./en_GB.UTF-8")
(invoke "localedef" "-i" "fr_FR" "-f" "UTF-8" "./fr_FR.UTF-8")
#t))
;; There are about 100 megabytes of documentation. ;; There are about 100 megabytes of documentation.
(add-after 'install 'install-docs (add-after 'install 'install-docs
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)

View file

@ -1,39 +0,0 @@
test-stress-options.scm does not exist, and test-qof passes when run in the
build directory after the gnucash build.
diff -ur gnucash-3.3.old/gnucash/report/standard-reports/test/CMakeLists.txt gnucash-3.3/gnucash/report/standard-reports/test/CMakeLists.txt
--- gnucash-3.3.old/gnucash/report/standard-reports/test/CMakeLists.txt 2018-10-04 09:29:00.916641417 -0400
+++ gnucash-3.3/gnucash/report/standard-reports/test/CMakeLists.txt 2018-10-04 09:30:52.962504860 -0400
@@ -13,10 +13,6 @@
test-income-gst.scm
)
-set(scm_test_with_textual_ports_SOURCES
- test-stress-options.scm
-)
-
set(GUILE_DEPENDS
scm-gnc-module
scm-app-utils
@@ -31,9 +27,6 @@
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}")
diff -ur gnucash-3.3.old/libgnucash/engine/test/CMakeLists.txt gnucash-3.3/libgnucash/engine/test/CMakeLists.txt
--- gnucash-3.3.old/libgnucash/engine/test/CMakeLists.txt 2018-10-04 09:29:00.876640751 -0400
+++ gnucash-3.3/libgnucash/engine/test/CMakeLists.txt 2018-10-05 10:46:22.542962546 -0400
@@ -54,8 +54,6 @@
# This test does not run on Win32
if (NOT WIN32)
set(SOURCES ${test_qof_SOURCES} ${CMAKE_SOURCE_DIR}/common/test-core/unittest-support.c)
- add_engine_test(test-qof "${SOURCES}")
- target_compile_definitions(test-qof PRIVATE TESTPROG=test_qof)
set(SOURCES ${test_engine_SOURCES} ${CMAKE_SOURCE_DIR}/common/test-core/unittest-support.c)
add_engine_test(test-engine "${SOURCES}")