Use guile/python executable as found during configure for tests and some support scripts

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23392 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens
2013-11-13 15:51:44 +00:00
parent 80c7559c3d
commit aac58df6b8
45 changed files with 100 additions and 54 deletions

View File

@@ -1253,9 +1253,7 @@ AC_MSG_RESULT($warnFLAGS)
### makefiles, so that we don't have an opportunity to adjust them
### there.
chmod u+x ${srcdir}/src/gnc-test-env
chmod u+x ${srcdir}/src/bin/generate-gnc-script
chmod u+x ${srcdir}/src/bin/overrides/gnucash-make-guids
### --------------------------------------------------------------------------
### Makefile creation
@@ -1431,6 +1429,7 @@ AC_CONFIG_FILES(
packaging/win32/gnucash.iss
src/bin/gnucash.rc
src/app-utils/migratable-prefs.xml
src/engine/iso-currencies-to-c
src/gnome/gnucash.desktop.in
dnl # GSettings schema files
src/business/business-gnome/gschemas/org.gnucash.dialogs.business.gschema.xml.in
@@ -1451,11 +1450,14 @@ AC_CONFIG_FILES(
src/import-export/gschemas/org.gnucash.dialogs.import.generic.gschema.xml.in
src/import-export/ofx/gschemas/org.gnucash.dialogs.import.ofx.gschema.xml.in
src/import-export/qif-import/gschemas/org.gnucash.dialogs.import.qif.gschema.xml.in
dnl # Please read doc/build-system before adding *anything* here
,
dnl # commands go here, but we don't have any right now
dnl # init-commands go here
)
# A few files need extra actions at creation time
AC_CONFIG_FILES([src/gnc-test-env], [chmod u+x src/gnc-test-env])
AC_CONFIG_FILES([src/bin/overrides/gnucash-make-guids], [chmod u+x src/bin/overrides/gnucash-make-guids])
AC_OUTPUT

View File

@@ -29,8 +29,10 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
TESTS_ENVIRONMENT = \
GUILE_WARN_DEPRECATED=no \
GUILE="${GUILE}" \
SRCDIR=${srcdir} \
GNC_BUILDDIR=`\cd ${top_builddir} && pwd` \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
LDADD = \
${top_builddir}/src/libqof/qof/libgnc-qof.la \

View File

@@ -1,5 +1,5 @@
#! /bin/sh
exec guile -s "$0"
exec ${GUILE} -s "$0"
!#
(setenv "GNC_UNINSTALLED" "1")

View File

@@ -41,7 +41,7 @@ TESTS_ENVIRONMENT = \
GNC_ACCOUNT_PATH=${top_srcdir}/accounts/C \
SRCDIR=${srcdir} \
${gnc_dbd_dir_override} \
$(shell ${top_srcdir}/src/gnc-test-env ${GNC_TEST_DEPS})
$(shell ${top_builddir}/src/gnc-test-env ${GNC_TEST_DEPS})
EXTRA_DIST += \
test-dbi-stuff.h \

View File

@@ -21,7 +21,7 @@ GNC_TEST_DEPS = \
TESTS_ENVIRONMENT = \
GNC_ACCOUNT_PATH=${top_srcdir}/accounts/C \
SRCDIR=${srcdir} \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
check_PROGRAMS = $(TESTS)

View File

@@ -198,7 +198,7 @@ TESTS_ENVIRONMENT = \
GNC_TEST_FILES=test-files/xml2 \
SRCDIR=${srcdir} \
GNC_BUILDDIR=`\cd ${top_builddir} && pwd` \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
check_LTLIBRARIES = libgnc-test-file-stuff.la

View File

@@ -29,7 +29,8 @@ then
export GNC_DOC_PATH
fi
eval `@-GNC_SRCDIR-@/src/gnc-test-env \
set +x
eval `${top_builddir}/src/gnc-test-env \
--gnc-module-dir ${top_builddir}/src/engine \
--gnc-module-dir ${top_builddir}/src/backend/xml \
--gnc-module-dir ${top_builddir}/src/network-utils \

View File

@@ -1,5 +1,5 @@
#!/bin/sh
exec gnucash-env guile -s "$0" "$@"
exec gnucash-env @GUILE@ -s "$0" "$@"
!#
(define (usage)

View File

@@ -27,7 +27,7 @@ GNC_TEST_DEPS = \
TESTS_ENVIRONMENT = \
SRCDIR=${srcdir} \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
check_PROGRAMS = \
test-gnc-uri-utils \

View File

@@ -206,8 +206,8 @@ swig-engine.c: engine.i $(top_srcdir)/src/base-typemaps.i \
endif
iso-4217-currencies.c: iso-4217-currencies.scm iso-currencies-to-c
-chmod u+x ${srcdir}/iso-currencies-to-c
${srcdir}/iso-currencies-to-c "${srcdir}"
-chmod u+x ./iso-currencies-to-c
./iso-currencies-to-c "${srcdir}"
BUILT_SOURCES = iso-4217-currencies.c

View File

@@ -1,5 +1,5 @@
#!/bin/sh
exec guile -s $0 "$@"
exec @GUILE@ -s $0 "$@"
!#
(if (< (length (command-line)) 2)

View File

@@ -65,9 +65,10 @@ GNC_TEST_DEPS = \
TESTS_ENVIRONMENT = \
GUILE_WARN_DEPRECATED=no \
GUILE="${GUILE}" \
SRCDIR=${srcdir} \
GNC_BUILDDIR=`\cd ${top_builddir} && pwd` \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
check_PROGRAMS = \
test-link \

View File

@@ -1,2 +1,2 @@
#!/bin/sh
guile -l $SRCDIR/test-create-account.scm -c "(exit (run-test))"
${GUILE} -l $SRCDIR/test-create-account.scm -c "(exit (run-test))"

View File

@@ -1,4 +1,2 @@
#!/bin/sh
guile -l $SRCDIR/test-scm-query-import.scm -c "(exit (run-test))"
#echo "run -l $SRCDIR/test-scm-query-import.scm -c \"(exit (run-test))\""
#gdb /afs/sipb/project/guile/bin/guile
${GUILE} -l $SRCDIR/test-scm-query-import.scm -c "(exit (run-test))"

View File

@@ -48,7 +48,8 @@ GNC_TEST_DEPS = \
TESTS_ENVIRONMENT = \
GUILE_WARN_DEPRECATED=no \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
GUILE="${GUILE}" \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
check_PROGRAMS = \
test-load-c \

View File

@@ -1,5 +1,5 @@
#! /bin/sh
guile -c "(use-modules (gnucash unittest-support))
${GUILE} -c "(use-modules (gnucash unittest-support))
(define log-domain \"gnc.module\")
(define check (new-TestErrorStruct))
(define log-level (G-LOG-LEVEL-WARNING))

View File

@@ -1,5 +1,5 @@
#! /bin/sh
exec guile -s $0 "$@"
exec ${GUILE} -s $0 "$@"
!#
;; test-load-deps.scm : load gnc-mod-baz, which depends on gnc-mod-foo

View File

@@ -1,5 +1,5 @@
#! /bin/sh
exec guile -s $0 "$@"
exec ${GUILE} -s $0 "$@"
!#
(use-modules (gnucash unittest-support))

View File

@@ -1,6 +1,6 @@
#! /bin/sh
echo " test-scm-dynload: testing dynamic-link of libgnc-module from Scheme.";
exec guile -s $0 "$@"
exec ${GUILE} -s $0 "$@"
!#
(if (or (string=? (version) "1.3")

View File

@@ -1,6 +1,6 @@
#! /bin/sh
echo " test-scm-init: testing Scheme-only module system init. ";
exec guile -s $0 "$@"
exec ${GUILE} -s $0 "$@"
!#
(use-modules (gnucash unittest-support))

View File

@@ -1,5 +1,5 @@
#! /bin/sh
guile -c "(use-modules (gnucash unittest-support))
${GUILE} -c "(use-modules (gnucash unittest-support))
(define log-domain \"gnc.module\")
(define check (new-TestErrorStruct))
(define log-level (G-LOG-LEVEL-WARNING))

View File

@@ -1,5 +1,5 @@
#! /bin/sh
exec guile -s $0 "$@"
exec ${GUILE} -s $0 "$@"
!#
(use-modules (gnucash unittest-support))
(define log-domain "gnc.module")

View File

@@ -1,5 +1,5 @@
#!/bin/sh
exec guile -s $0 "$@"
exec @GUILE@ -s $0 "$@"
!#
;; Spit out the environment variable settings needed based on

View File

@@ -28,9 +28,10 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
TESTS_ENVIRONMENT = \
GUILE_WARN_DEPRECATED=no \
GUILE="${GUILE}" \
SRCDIR=${srcdir} \
GNC_BUILDDIR=`\cd ${top_builddir} && pwd` \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
check_PROGRAMS = \
test-link-module test-gnc-recurrence

View File

@@ -1,5 +1,5 @@
#! /bin/sh
exec guile -s $0
exec ${GUILE} -s $0
!#
(setenv "GNC_UNINSTALLED" "1")

View File

@@ -41,7 +41,7 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/core-utils \
TESTS_ENVIRONMENT = \
GNC_TEST_FILES=${srcdir}/test-files \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
check_PROGRAMS = \
test-link \

View File

@@ -48,7 +48,7 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
TESTS_ENVIRONMENT = \
GUILE_WARN_DEPRECATED=no \
GNC_BUILDDIR=`\cd ${top_builddir} && pwd` \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
check_PROGRAMS = \
test-link \

View File

@@ -1,12 +1,42 @@
GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
--gnc-module-dir ${top_builddir}/src/app-utils \
--guile-load-dir ${top_builddir}/src/core-utils \
--guile-load-dir ${top_builddir}/src/gnc-module \
--guile-load-dir ${top_builddir}/src/engine \
--guile-load-dir ${top_builddir}/src/scm \
--guile-load-dir ${top_builddir}/src/app-utils \
--library-dir ${top_builddir}/src/libqof/qof \
--library-dir ${top_builddir}/src/core-utils \
--library-dir ${top_builddir}/src/gnc-module \
--library-dir ${top_builddir}/src/engine \
--library-dir ${top_builddir}/src/backend/xml \
--library-dir ${top_builddir}/src/backend/sql \
--library-dir ${top_builddir}/src/app-utils
TESTS_ENVIRONMENT = \
GNC_BUILDDIR=`\cd ${top_builddir} && pwd` \
PYTHON=${PYTHON} \
PYTHONPATH=$(PYTHONPATH):$(top_builddir)/src/optional/python-bindings \
PYTHONPATH=$$PYTHONPATH:$(top_builddir)/src/optional/python-bindings/.libs \
PYTHONPATH=$$PYTHONPATH:$(top_builddir)/src/test-core/ \
PYTHONPATH=$$PYTHONPATH:$(top_srcdir)/src/test-core/ \
PYTHONPATH=$$PYTHONPATH:$(top_builddir)/src/test-core/.libs \
$(top_builddir)/src/bin/overrides/gnucash-build-env $(PYTHON)
$(shell $(top_builddir)/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
## We borrow guile's convention and use @-...-@ as the substitution
## brackets below, instead of the usual @...@. This prevents autoconf
## from substituting the values directly into the left-hand sides of
## the sed substitutions. *sigh*
runTests.py: runTests.py.in ${top_builddir}/config.status Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
-e 's#@-PYTHON-@#${PYTHON}#'
mv $@.tmp $@
chmod u+x $@
CLEANFILES = runTests.py
TESTS = runTests.py
clean-local:

View File

@@ -1,3 +1,5 @@
#!@-PYTHON-@
import unittest
import os

View File

@@ -6,7 +6,7 @@ TESTS = \
#
#TESTS_ENVIRONMENT := \
# $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
# $(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
check_PROGRAMS = \
test-link-module

View File

@@ -6,7 +6,7 @@ TESTS = \
#
#TESTS_ENVIRONMENT := \
# $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
# $(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
check_PROGRAMS = \
test-link-module

View File

@@ -14,7 +14,9 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
--library-dir ${top_builddir}/src/app-utils
TESTS_ENVIRONMENT = \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
GUILE_WARN_DEPRECATED=no \
GUILE="${GUILE}" \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
check_PROGRAMS = test-link-module

View File

@@ -1,5 +1,5 @@
#! /bin/sh
exec guile -s $0
exec ${GUILE} -s $0
!#
(use-modules (gnucash gnc-module))

View File

@@ -51,8 +51,9 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
TESTS_ENVIRONMENT = \
GUILE_WARN_DEPRECATED=no \
GUILE="${GUILE}" \
GNC_BUILDDIR=`\cd ${top_builddir} && pwd` \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
check_PROGRAMS = test-link-module

View File

@@ -1,5 +1,5 @@
#! /bin/sh
exec guile -s "$0"
exec ${GUILE} -s "$0"
!#
(debug-enable 'debug)

View File

@@ -51,13 +51,14 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
--library-dir ${top_builddir}/src/gnc-module
$(SCM_TESTS): %: $(srcdir)/%.scm Makefile .scm-links
echo 'guile --debug -l $(srcdir)/$*.scm -c "(exit (run-test))"' > $@
echo '${GUILE} --debug -l $(srcdir)/$*.scm -c "(exit (run-test))"' > $@
chmod a+x $@
TESTS_ENVIRONMENT = \
GUILE_WARN_DEPRECATED=no \
GUILE="${GUILE}" \
GNC_BUILDDIR=`\cd ${top_builddir} && pwd` \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
check_PROGRAMS = test-link-module

View File

@@ -1,5 +1,5 @@
#! /bin/sh
exec guile -s "$0"
exec ${GUILE} -s "$0"
!#
(debug-enable 'debug)

View File

@@ -41,13 +41,14 @@ GNC_TEST_DEPS = \
--library-dir ${top_builddir}/src/gnc-module
$(SCM_TESTS): %: $(srcdir)/%.scm Makefile .scm-links
echo 'guile --debug -l $(srcdir)/$*.scm -c "(exit (run-test))"' > $@
echo '${GUILE} --debug -l $(srcdir)/$*.scm -c "(exit (run-test))"' > $@
chmod a+x $@
TESTS_ENVIRONMENT = \
GUILE_WARN_DEPRECATED=no \
GUILE="${GUILE}" \
GNC_BUILDDIR=`\cd ${top_builddir} && pwd` \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
SCM_TEST_HELPERS = \
@@ -70,7 +71,7 @@ if ! OS_WIN32
endif
interp:
$(TESTS_ENVIRONMENT) guile --debug
$(TESTS_ENVIRONMENT) ${GUILE} --debug
debug:
$(TESTS_ENVIRONMENT) gdb --args $(shell cat $(TEST))

View File

@@ -1,5 +1,5 @@
#! /bin/sh
exec guile -s "$0"
exec ${GUILE} -s "$0"
!#
(display " testing standard report module load ... ")

View File

@@ -32,7 +32,8 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
TESTS_ENVIRONMENT = \
GUILE_WARN_DEPRECATED=no \
GUILE="${GUILE}" \
GNC_BUILDDIR=`\cd ${top_builddir} && pwd` \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
EXTRA_DIST = test-load-module

View File

@@ -1,5 +1,5 @@
#! /bin/sh
exec guile -s "$0"
exec ${GUILE} -s "$0"
!#
(setenv "GNC_UNINSTALLED" "1")

View File

@@ -27,7 +27,8 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
TESTS_ENVIRONMENT = \
GUILE_WARN_DEPRECATED=no \
GUILE="${GUILE}" \
GNC_BUILDDIR=`\cd ${top_builddir} && pwd` \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
EXTRA_DIST = test-load-module

View File

@@ -1,5 +1,5 @@
#! /bin/sh
exec guile -s "$0"
exec ${GUILE} -s "$0"
!#
(display " testing utility report module load ... ")

View File

@@ -9,7 +9,8 @@ GNC_TEST_DEPS = \
--library-dir ${top_builddir}/src/gnc-module
TESTS_ENVIRONMENT = \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
GUILE="${GUILE}" \
$(shell ${top_builddir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
check_PROGRAMS=test-link-module
test_link_module_SOURCES=test-link-module.c

View File

@@ -1,5 +1,5 @@
#! /bin/sh
exec guile -s "$0"
exec ${GUILE} -s "$0"
!#
(display " testing US tax info module load ... ")