mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[Testing] Suppress expected messages from guile tests
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21726 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
1619cb7f0a
commit
a196a9953b
@ -33,12 +33,14 @@ GNC_TEST_DEPS = \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module/test/mod-bar \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module/test/mod-baz \
|
||||
--gnc-module-dir ${top_builddir}/src/gnc-module/test/misc-mods \
|
||||
--guile-load-dir ${top_builddir}/src/test-core \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_srcdir}/src/gnc-module/test/mod-foo \
|
||||
--guile-load-dir ${top_srcdir}/src/gnc-module/test/mod-baz \
|
||||
--guile-load-dir ${top_srcdir}/src/gnc-module/test/mod-bar \
|
||||
--library-dir ${top_builddir}/src/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/test-core \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/gnc-module/test/mod-foo \
|
||||
--library-dir ${top_builddir}/src/gnc-module/test/mod-bar \
|
||||
|
@ -1,5 +1,15 @@
|
||||
#! /bin/sh
|
||||
guile -c "(use-modules (gnucash gnc-module))
|
||||
guile -c "(use-modules (gnucash test-stuff))
|
||||
(define log-domain \"gnc.module\")
|
||||
(define check (new-TestErrorStruct))
|
||||
(define log-level (G-LOG-LEVEL-WARNING))
|
||||
(define msg \"Module '../../../src/gnc-module/test/misc-mods/.libs/libgncmod_futuremodsys.so' requires newer module system\n\")
|
||||
(TestErrorStruct-log-domain-set check log-domain)
|
||||
(TestErrorStruct-log-level-set check log-level)
|
||||
(TestErrorStruct-msg-set check msg)
|
||||
(define handler (test-set-checked-handler log-domain log-level check))
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-system-init)
|
||||
(gnc:module-load \"gnucash/foo\" 0)
|
||||
(exit (eq? 10 (foo-hello)))"
|
||||
(exit (eq? 10 (foo-hello)))
|
||||
(g-log-remove-handler log-domain handler)"
|
||||
|
@ -3,6 +3,15 @@ exec guile -s $0 "$@"
|
||||
!#
|
||||
;; test-load-deps.scm : load gnc-mod-baz, which depends on gnc-mod-foo
|
||||
|
||||
(use-modules (gnucash test-stuff))
|
||||
(define log-domain "gnc.module")
|
||||
(define check (new-TestErrorStruct))
|
||||
(define log-level (G-LOG-LEVEL-WARNING))
|
||||
(define msg "Module '../../../src/gnc-module/test/misc-mods/.libs/libgncmod_futuremodsys.so' requires newer module system\n")
|
||||
(TestErrorStruct-log-domain-set check log-domain)
|
||||
(TestErrorStruct-log-level-set check log-level)
|
||||
(TestErrorStruct-msg-set check msg)
|
||||
(define handler (test-set-checked-handler log-domain log-level check))
|
||||
(use-modules (gnucash gnc-module))
|
||||
|
||||
(gnc:module-system-init)
|
||||
@ -13,6 +22,8 @@ exec guile -s $0 "$@"
|
||||
(baz:scheme-hello)
|
||||
(foo:scheme-hello)
|
||||
|
||||
(g-log-remove-handler log-domain handler)
|
||||
|
||||
(exit 0)
|
||||
|
||||
;; Local Variables:
|
||||
|
@ -2,10 +2,19 @@
|
||||
exec guile -s $0 "$@"
|
||||
!#
|
||||
|
||||
(use-modules (gnucash test-stuff))
|
||||
(define log-domain "gnc.module")
|
||||
(define check (new-TestErrorStruct))
|
||||
(define log-level (G-LOG-LEVEL-WARNING))
|
||||
(define msg "Module '../../../src/gnc-module/test/misc-mods/.libs/libgncmod_futuremodsys.so' requires newer module system\n")
|
||||
(TestErrorStruct-log-domain-set check log-domain)
|
||||
(TestErrorStruct-log-level-set check log-level)
|
||||
(TestErrorStruct-msg-set check msg)
|
||||
(define handler (test-set-checked-handler log-domain log-level check))
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-system-init)
|
||||
(gnc:module-load "gnucash/foo" 0)
|
||||
|
||||
(g-log-remove-handler log-domain handler)
|
||||
;; Local Variables:
|
||||
;; mode: scheme
|
||||
;; End:
|
||||
|
@ -3,9 +3,21 @@ echo " test-scm-init: testing Scheme-only module system init. ";
|
||||
exec guile -s $0 "$@"
|
||||
!#
|
||||
|
||||
(use-modules (gnucash test-stuff))
|
||||
(define log-domain "gnc.module")
|
||||
(define check (new-TestErrorStruct))
|
||||
(define log-level (G-LOG-LEVEL-WARNING))
|
||||
(define msg "Module '../../../src/gnc-module/test/misc-mods/.libs/libgncmod_futuremodsys.so' requires newer module system\n")
|
||||
(TestErrorStruct-log-domain-set check log-domain)
|
||||
(TestErrorStruct-log-level-set check log-level)
|
||||
(TestErrorStruct-msg-set check msg)
|
||||
(define handler (test-set-checked-handler log-domain log-level check))
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-system-init)
|
||||
|
||||
(g-log-remove-handler log-domain handler)
|
||||
|
||||
;; LocalVariables:
|
||||
;; mode: scheme
|
||||
;; End:
|
||||
|
@ -1,5 +1,15 @@
|
||||
#! /bin/sh
|
||||
guile -c "(use-modules (gnucash gnc-module))
|
||||
guile -c "(use-modules (gnucash test-stuff))
|
||||
(define log-domain \"gnc.module\")
|
||||
(define check (new-TestErrorStruct))
|
||||
(define log-level (G-LOG-LEVEL-WARNING))
|
||||
(define msg \"Module '../../../src/gnc-module/test/misc-mods/.libs/libgncmod_futuremodsys.so' requires newer module system\n\")
|
||||
(TestErrorStruct-log-domain-set check log-domain)
|
||||
(TestErrorStruct-log-level-set check log-level)
|
||||
(TestErrorStruct-msg-set check msg)
|
||||
(define handler (test-set-checked-handler log-domain log-level check))
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-system-init)
|
||||
(if (not (gnc:module-load \"gnucash/foo\" 0)) (exit -1))
|
||||
(exit (foo:scheme-hello))"
|
||||
(exit (foo:scheme-hello))
|
||||
(g-log-remove-handler log-domain handler)"
|
||||
|
@ -1,6 +1,15 @@
|
||||
#! /bin/sh
|
||||
exec guile -s $0 "$@"
|
||||
!#
|
||||
(use-modules (gnucash test-stuff))
|
||||
(define log-domain "gnc.module")
|
||||
(define check (new-TestErrorStruct))
|
||||
(define log-level (G-LOG-LEVEL-WARNING))
|
||||
(define msg "Module '../../../src/gnc-module/test/misc-mods/.libs/libgncmod_futuremodsys.so' requires newer module system\n")
|
||||
(TestErrorStruct-log-domain-set check log-domain)
|
||||
(TestErrorStruct-log-level-set check log-level)
|
||||
(TestErrorStruct-msg-set check msg)
|
||||
(define handler (test-set-checked-handler log-domain log-level check))
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-system-init)
|
||||
@ -13,6 +22,8 @@ exec guile -s $0 "$@"
|
||||
(bar-hello)
|
||||
(bar:scheme-hello)
|
||||
|
||||
(g-log-remove-handler log-domain handler)
|
||||
|
||||
;; Local Variables:
|
||||
;; mode: scheme
|
||||
;; End:
|
||||
|
@ -8,6 +8,7 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
|
||||
--gnc-module-dir ${top_builddir}/src/report/stylesheets \
|
||||
--gnc-module-dir ${top_builddir}/src/calculation \
|
||||
\
|
||||
--guile-load-dir ${top_builddir}/src/test-core \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
@ -18,6 +19,7 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
|
||||
--guile-load-dir ${top_builddir}/src/report/stylesheets \
|
||||
\
|
||||
--library-dir ${top_builddir}/src/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/test-core \
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
|
@ -4,14 +4,25 @@ exec guile -s "$0"
|
||||
|
||||
(setenv "GNC_UNINSTALLED" "1")
|
||||
(display " testing stylesheet module load ... ")
|
||||
(use-modules (gnucash test-stuff))
|
||||
(define log-domain "gnc.report.core")
|
||||
(define check (new-TestErrorStruct))
|
||||
(define log-level (G-LOG-LEVEL-CRITICAL))
|
||||
(define msg "gnc_get_default_report_font_family: assertion `top_list != NULL' failed")
|
||||
(TestErrorStruct-log-domain-set check log-domain)
|
||||
(TestErrorStruct-log-level-set check log-level)
|
||||
(TestErrorStruct-msg-set check msg)
|
||||
(define handler (test-set-checked-handler log-domain log-level check))
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-system-init)
|
||||
|
||||
(if (gnc:module-load "gnucash/report/stylesheets" 0)
|
||||
(begin
|
||||
(g-log-remove-handler log-domain handler)
|
||||
(display "ok\n")
|
||||
(exit 0))
|
||||
(begin
|
||||
(g-log-remove-handler log-domain handler)
|
||||
(display "failed\n")
|
||||
(exit -1)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user