[sagemath] 01/01: Set DOT_SAGE to debian/test, and misc other build-rule edits
Ximin Luo
infinity0 at debian.org
Fri Dec 9 00:53:14 UTC 2016
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository sagemath.
commit f83a65acb151f3c59f95a9fb4be6e92b08ab268c
Author: Ximin Luo <infinity0 at debian.org>
Date: Fri Dec 9 01:52:40 2016 +0100
Set DOT_SAGE to debian/test, and misc other build-rule edits
- Use $(CURDIR) instead of pwd which is more conventional
- Shorten instructions in README.source
- When analyzing errors, also search for "Warning:"
---
debian/README.source | 8 +++-----
debian/rules | 18 ++++++++++++------
2 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/debian/README.source b/debian/README.source
index adb8778..d191fc2 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -35,9 +35,7 @@ end of the logging output, there will be a summary of all the failures.
After a successful build, you can run individual tests as follows. First, make
sure you're in the top-level package directory, where debian/ is. Then:
- $ export SAGE_LOCAL=$PWD/debian/build/usr
- $ export PYTHONPATH=$SAGE_LOCAL/lib/python2.7/dist-packages
- $ cd sage
+ $ . <(debian/rules export-build-env) # assumes you're in bash or zsh
sage$ ./sage -t -p --long src/sage/file/you/want/to/test
If doing this after `dh_auto_install` has succeeded (this is the case if you
@@ -99,11 +97,11 @@ There are three cases:
First, if debian/tmp/usr exists then move it to debian/build/usr. Then:
$ DEB_BUILD_OPTIONS=nodoc debian/rules build
-
+
This *should* only build the changed files. However we explicitly avoid
rebuilding the documentation, because incremental docbuild is currently
broken in upstream (#21612).
-
+
If you are impatient, you can even cancel the build early using Ctrl-C -
after it copies .so files into debian/build - then run your test again.
diff --git a/debian/rules b/debian/rules
index 1e5acea..d63b24d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,8 +13,9 @@ export CCACHE_BASEDIR := $(CURDIR)/debian/build
$(shell mkdir -p "$(CCACHE_DIR)")
endif
-export SAGE_LOCAL = $(shell pwd)/debian/build/usr
-export PYTHONPATH = $(shell pwd)/debian/build/usr/lib/python2.7/dist-packages
+export SAGE_LOCAL = $(CURDIR)/debian/build/usr
+export PYTHONPATH = $(CURDIR)/debian/build/usr/lib/python2.7/dist-packages
+export DOT_SAGE = $(CURDIR)/debian/test
LANGS = $(shell cd sage/src/doc && find . -mindepth 1 -maxdepth 1 -type d | grep -v common | cut -b3-)
DOCS_INSTALL = $(LANGS:%=debian/sagemath-doc-%.install)
@@ -26,6 +27,11 @@ DOCS_DOC_BASE = $(LANGS:%=debian/sagemath-doc-%.doc-base)
binary build clean install: debian/control
+export-build-env:
+ @echo export SAGE_LOCAL=$(SAGE_LOCAL)
+ @echo export PYTHONPATH=$(PYTHONPATH)
+ @echo export DOT_SAGE=$(DOT_SAGE)
+
debian/control: debian/control.in $(DOCS_CONTROL)
cat $^ > "$@"
sed -i -e '/RUNTIME_DEPENDS/ {' -e 'r debian/control.runtime-depends' -e 'd' -e '}' "$@"
@@ -130,7 +136,7 @@ else
preserve_docs = $(1)
endif
override_dh_clean:
- rm -f $(DOCS_INSTALL) $(DOCS_DOC_BASE)
+ rm -f $(DOCS_INSTALL) $(DOCS_DOC_BASE) $(DOT_SAGE)
$(call preserve_docs,dh_clean,debian/tmp)
$(call preserve_docs,rm -rf debian/build/*,debian/build)
@@ -140,7 +146,7 @@ get-orig-source:
prune: debian/control
cd debian/pruner && autoconf -I m4
- cd debian/pruner && ./configure --with-sage-root="$(shell pwd)/sage"
+ cd debian/pruner && ./configure --with-sage-root="$(CURDIR)/sage"
cd sage && python ../debian/pruner/pruner.py || test $$(dpkg-parsechangelog -l../debian/changelog -SDistribution) = unstable-sage
touch prune
@@ -200,11 +206,11 @@ failed-tests-by-count:
failed-tests-by-error:
# Filter out NameError; most of these are caused by earlier errors
- grep 'Error:' sage/logs/ptestlong.log \
+ grep '\(Error\|Warning\):' sage/logs/ptestlong.log \
| grep -v NameError \
| sort | uniq -c | sort -k1n,1n
-FT_CAUSE_ERRORTYPE = Error
+FT_CAUSE_ERRORTYPE = \(Error\|Warning\)
FT_CAUSE_BACKTRACE = 2
failed-tests-by-cause:
grep -B$$((2 * $(FT_CAUSE_BACKTRACE))) -Z '$(FT_CAUSE_ERRORTYPE):' sage/logs/ptestlong.log \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git
More information about the debian-science-commits
mailing list