[Pkg-octave-commit] [octave-pkg-dev] 01/01: octave-pkg.mk: Allow prefix to the Octave command when running the tests.
Rafael Laboissière
rlaboiss-guest at moszumanska.debian.org
Fri May 16 12:11:50 UTC 2014
This is an automated email from the git hooks/post-receive script.
rlaboiss-guest pushed a commit to branch master
in repository octave-pkg-dev.
commit e994cfb991da2926017aac82f816ccd24a52f092
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date: Fri May 16 09:34:29 2014 +0200
octave-pkg.mk: Allow prefix to the Octave command when running the tests.
There is now a new Makefile variable OCTPKG_TEST_ENV, whose value is
inserted before the Octave command when tests are launched. Users can
set it in debian/rules, in order to add environment variables to the
Octave process or specify a prefix command (like xvfb-run).
Git-Dch: Full
---
octave-pkg.mk | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/octave-pkg.mk b/octave-pkg.mk
index 188f815..7158151 100644
--- a/octave-pkg.mk
+++ b/octave-pkg.mk
@@ -42,6 +42,13 @@ local_list = local-list
# 'verbose'. Users must set its value after inclusion of octave-pkg.mk.
OCTPKG_TEST_OPT =
+# The following variable can be overriden in debian/rules to alter the the
+# way the tests are run. Its is value is prepended to the octave command.
+# A sensible value for it would be 'xvfb-run', but environment variables
+# can be also set. Users must set its value after inclusion of
+# octave-pkg.mk.
+OCTPKG_TEST_ENV =
+
export OCTAVE_HISTFILE=/dev/null
# even with '--no-history', Octave creates an empty .octave_hist at startup,
# resulting in 'permission denied errors on the buildds
@@ -127,7 +134,7 @@ check-pkg:
| perl -pe 's:[^@]*/(.*)\.m::; \
print "disp (\"[$$1]\")\ntest $$1 $(OCTPKG_TEST_OPT)"' \
>> $$tmp ; \
- $(octave) $(octave_options) $$tmp ; \
+ $(OCTPKG_TEST_ENV) $(octave) $(octave_options) $$tmp ; \
rm -f $$tmp
# Extract tests from .cc files - these are not installed, but the
@@ -158,10 +165,10 @@ check-pkg:
octave $(octave_options) $$tmp ; \
rm -f $$tmp
- @if [ -f debian/check.m ] ; then \
- $(octave) $(octave_options) --eval \
- "addpath (genpath ([pwd(),'/debian'])); \
- source ('debian/check.m');" ; \
+ @if [ -f debian/check.m ] ; then \
+ $(OCTPKG_TEST_ENV) $(octave) $(octave_options) --eval \
+ "addpath (genpath ([pwd(),'/debian'])); \
+ source ('debian/check.m');" ; \
fi
-[ -e PKG_ADD.bak ] && mv PKG_ADD.bak PKG_ADD
--
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-pkg-dev.git
More information about the Pkg-octave-commit
mailing list