[Pkg-octave-commit] [octave-pkg-dev] 02/04: Allow exclusion of files from the automatic run of test blocks
Rafael Laboissière
rlaboiss-guest at moszumanska.debian.org
Sun Feb 15 22:04:45 UTC 2015
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 36a63d90a557c778be8dfd3e4cc77e3a6f9d697b
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date: Sun Feb 15 19:31:42 2015 -0200
Allow exclusion of files from the automatic run of test blocks
---
octave-pkg.mk | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/octave-pkg.mk b/octave-pkg.mk
index bc83142..16ab4f1 100644
--- a/octave-pkg.mk
+++ b/octave-pkg.mk
@@ -49,6 +49,12 @@ OCTPKG_TEST_OPT =
# octave-pkg.mk.
OCTPKG_TEST_ENV =
+# The following variable can be overriden in debian/rules to prevent
+# the execution of the test blocks for certian files. This variable
+# should contain a space-separated list of file names (*.m or *.cc)
+# for which the unit tests should not be run.
+OCTPKG_EXCLUDE_TEST =
+
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
@@ -119,8 +125,11 @@ install-docs:
rm -rf $(debpkg)/$(mpath)/*/doc ; \
fi
-.PHONY: check-pkg
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+# Compose the expression for exclusion of requested files from the find command
+excluded_files_expr = $(shell for i in $(OCTPKG_EXCLUDE_TEST) ; do echo " -a ! -name $$i " ; done)
+
+.PHONY: check-pkg
check-pkg:
-[ -e PKG_ADD ] && mv PKG_ADD PKG_ADD.bak
@@ -130,7 +139,7 @@ check-pkg:
@echo Checking m files ...
@tmp=$$(tempfile) ; \
echo "addpath (genpath ([pwd(),'/debian']));" > $$tmp ; \
- find debian/ -name \*.m \
+ find debian/ -name \*.m $(excluded_files_expr) \
| grep -v /private/ \
| xargs grep -l '^%!\(assert\|test\)' \
| perl -pe 's:[^@]*/(.*)\.m::; \
@@ -158,7 +167,7 @@ check-pkg:
echo "source('PKG_ADD.bak');" >> $$tmp ; \
fi ; \
if [ -d src ] ; then \
- find src/ -name \*.cc \
+ find src/ -name \*.cc $(excluded_files_expr) \
| xargs grep -l '^%!\(assert\|test\)' \
| perl -pe 's:.*/(.*)\.cc::; \
print "disp (\"[$$1]\")\ntest $$1 $(OCTPKG_TEST_OPT)"' \
--
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