[Python-modules-commits] r31809 - in packages/python-git/trunk/debian (5 files)
yoh at users.alioth.debian.org
yoh at users.alioth.debian.org
Sat Feb 7 16:04:23 UTC 2015
Date: Saturday, February 7, 2015 @ 16:04:22
Author: yoh
Revision: 31809
enable testing against GitPython upstream repo
Added:
packages/python-git/trunk/debian/patches/series
packages/python-git/trunk/debian/patches/up_respect_git_python_test_env_var
Modified:
packages/python-git/trunk/debian/changelog
packages/python-git/trunk/debian/control
packages/python-git/trunk/debian/rules
Modified: packages/python-git/trunk/debian/changelog
===================================================================
--- packages/python-git/trunk/debian/changelog 2015-02-07 16:03:59 UTC (rev 31808)
+++ packages/python-git/trunk/debian/changelog 2015-02-07 16:04:22 UTC (rev 31809)
@@ -9,7 +9,8 @@
used for testing
- needs gitdb >= 0.6.4 -- adjusted version in *Depends
* debian/rules
- - enable build-time testing but ignore failures for now
+ - enable build-time testing if available on network and capable of
+ cloning original GitPython repository
-- Yaroslav Halchenko <debian at onerussian.com> Thu, 05 Feb 2015 18:44:46 -0500
Modified: packages/python-git/trunk/debian/control
===================================================================
--- packages/python-git/trunk/debian/control 2015-02-07 16:03:59 UTC (rev 31808)
+++ packages/python-git/trunk/debian/control 2015-02-07 16:04:22 UTC (rev 31809)
@@ -7,6 +7,7 @@
Build-Depends: debhelper (>= 7.0.50~), python, python-setuptools (>= 0.6a9),
python-sphinx,
python-nose, python-smmap (>= 0.8.3~), python-gitdb (>= 0.6.4), python-mock,
+ git,
Standards-Version: 3.9.6
Homepage: https://github.com/gitpython-developers/GitPython
XS-Python-Version: all
Added: packages/python-git/trunk/debian/patches/series
===================================================================
--- packages/python-git/trunk/debian/patches/series (rev 0)
+++ packages/python-git/trunk/debian/patches/series 2015-02-07 16:04:22 UTC (rev 31809)
@@ -0,0 +1 @@
+up_respect_git_python_test_env_var
Added: packages/python-git/trunk/debian/patches/up_respect_git_python_test_env_var
===================================================================
--- packages/python-git/trunk/debian/patches/up_respect_git_python_test_env_var (rev 0)
+++ packages/python-git/trunk/debian/patches/up_respect_git_python_test_env_var 2015-02-07 16:04:22 UTC (rev 31809)
@@ -0,0 +1,11 @@
+--- a/git/test/lib/helper.py
++++ b/git/test/lib/helper.py
+@@ -15,7 +15,7 @@ import io
+ from git import Repo, Remote, GitCommandError, Git
+ from git.compat import string_types
+
+-GIT_REPO = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
++GIT_REPO = os.environ.get("GIT_PYTHON_TEST_GIT_REPO_BASE", os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))))
+
+ __all__ = (
+ 'fixture_path', 'fixture', 'absolute_project_path', 'StringProcessAdapter',
Modified: packages/python-git/trunk/debian/rules
===================================================================
--- packages/python-git/trunk/debian/rules 2015-02-07 16:03:59 UTC (rev 31808)
+++ packages/python-git/trunk/debian/rules 2015-02-07 16:04:22 UTC (rev 31809)
@@ -8,11 +8,21 @@
dh $@ --with python2
override_dh_auto_test:
- nosetests -s -v --exclude='test_(submodule.*|root_module|fetch_info)' git/test || echo "TESTS FAILED but keep going..."
+ : # run tests only if we can fetch original sources repository
+ -mkdir -p build/test; cd build/test; \
+ git clone git://github.com/gitpython-developers/GitPython; cd GitPython; git submodule update --init --recursive; \
+ for i in `seq 4`; do git reset --hard HEAD~1; done; git reset --hard origin/master; \
+ git config user.name "TESTING"; \
+ git config user.email "TESTING at example.com"; \
+ touch build/test/go
+ [ ! -e build/test/go ] && \
+ GIT_PYTHON_TEST_GIT_REPO_BASE=$(CURDIR)/build/test/GitPython \
+ nosetests -s -v git/test
clean:
rm -f lib/GitPython.egg-info/SOURCES.txt
dh clean
+ rm -rf build
DOC_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p' | sed 's/~.*//')
UPSTREAM=$(shell dpkg-parsechangelog | sed -nr 's/Version: (.*)-[^-]*/\1/p')
More information about the Python-modules-commits
mailing list