mirror of https://github.com/Gnucash/gnucash
I.e., remove the shell invocation and with it the need to set the shebang. Surprisingly this required some build-system modifications particularly for cmake in order to correctly set the environment.pull/231/head
parent
f412795ef2
commit
6c01e54042
@ -1,7 +1,3 @@
|
||||
#! @SHELL@
|
||||
exec ${GUILE} -s $0
|
||||
!#
|
||||
|
||||
(setenv "GNC_UNINSTALLED" "1")
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-system-init)
|
||||
@ -1,6 +1,24 @@
|
||||
CONFIGURE_FILE(test-load-module.in test-load-module @ONLY)
|
||||
GNC_ADD_SCHEME_TEST(test-load-module-report-stylesheets
|
||||
test-load-module.in
|
||||
SET(GUILE_DEPENDS
|
||||
test-core
|
||||
gncmod-app-utils
|
||||
gnc-core-utils
|
||||
gnc-module
|
||||
gncmod-engine
|
||||
gncmod-backend-xml
|
||||
gncmod-backend-xml
|
||||
gncmod-gnome-utils
|
||||
gncmod-html
|
||||
gncmod-report-system
|
||||
gncmod-report-gnome
|
||||
)
|
||||
|
||||
SET_DIST_LIST(test_stylesheets_DIST CMakeLists.txt Makefile.am test-load-module.in)
|
||||
GNC_ADD_SCHEME_TARGETS(scm-test-load-report-stylesheets-module
|
||||
"test-load-report-stylesheets-module.scm"
|
||||
"gnucash/report"
|
||||
"${GUILE_DEPENDS}"
|
||||
FALSE
|
||||
)
|
||||
|
||||
GNC_ADD_SCHEME_TESTS("test-load-report-stylesheets-module.scm")
|
||||
|
||||
SET_DIST_LIST(test_stylesheets_DIST CMakeLists.txt Makefile.am test-load-report-stylesheets-module.scm)
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
#! @SHELL@
|
||||
exec ${GUILE} -s "$0"
|
||||
!#
|
||||
|
||||
(define exit-code 0)
|
||||
(setenv "GNC_UNINSTALLED" "1")
|
||||
(use-modules (gnucash gnc-module))
|
||||
@ -1,2 +0,0 @@
|
||||
#!@SHELL@
|
||||
${GUILE} -l $SRCDIR/test-create-account.scm -c "(exit (run-test))"
|
||||
@ -1,2 +0,0 @@
|
||||
#!@SHELL@
|
||||
${GUILE} -l $SRCDIR/test-scm-query-import.scm -c "(exit (run-test))"
|
||||
@ -0,0 +1,5 @@
|
||||
(if (or (string=? (version) "1.3")
|
||||
(string=? (version) "1.3.4"))
|
||||
(dynamic-link "libgnc-module.so")
|
||||
(dynamic-link "libgnc-module"))
|
||||
(exit 0)
|
||||
@ -0,0 +1,14 @@
|
||||
(use-modules (gnucash unittest-support))
|
||||
(define log-domain "gnc.module")
|
||||
(define check (new-TestErrorStruct))
|
||||
(define log-level (G-LOG-LEVEL-WARNING))
|
||||
(define msg "Module '../../../libgnucash/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))
|
||||
(g-log-remove-handler log-domain handler)
|
||||
@ -0,0 +1,14 @@
|
||||
(use-modules (gnucash unittest-support))
|
||||
(define log-domain "gnc.module")
|
||||
(define check (new-TestErrorStruct))
|
||||
(define log-level (G-LOG-LEVEL-WARNING))
|
||||
(define msg "Module '../../../libgnucash/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)))
|
||||
(g-log-remove-handler log-domain handler)
|
||||
@ -1,15 +0,0 @@
|
||||
#! @SHELL@
|
||||
${GUILE} -c "(use-modules (gnucash unittest-support))
|
||||
(define log-domain \"gnc.module\")
|
||||
(define check (new-TestErrorStruct))
|
||||
(define log-level (G-LOG-LEVEL-WARNING))
|
||||
(define msg \"Module '../../../libgnucash/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)))
|
||||
(g-log-remove-handler log-domain handler)"
|
||||
@ -1,15 +0,0 @@
|
||||
#! @SHELL@
|
||||
echo " test-scm-dynload: testing dynamic-link of libgnc-module from Scheme.";
|
||||
exec ${GUILE} -s $0 "$@"
|
||||
!#
|
||||
|
||||
(if (or (string=? (version) "1.3")
|
||||
(string=? (version) "1.3.4"))
|
||||
(dynamic-link "libgnc-module.so")
|
||||
(dynamic-link "libgnc-module"))
|
||||
|
||||
;; LocalVariables:
|
||||
;; mode: scheme
|
||||
;; End:
|
||||
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
#! @SHELL@
|
||||
${GUILE} -c "(use-modules (gnucash unittest-support))
|
||||
(define log-domain \"gnc.module\")
|
||||
(define check (new-TestErrorStruct))
|
||||
(define log-level (G-LOG-LEVEL-WARNING))
|
||||
(define msg \"Module '../../../libgnucash/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))
|
||||
(g-log-remove-handler log-domain handler)"
|
||||
@ -1,7 +1,3 @@
|
||||
#! @SHELL@
|
||||
exec ${GUILE} -s "$0"
|
||||
!#
|
||||
|
||||
(display " testing US tax info module load ... ")
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-system-init)
|
||||
Loading…
Reference in new issue