[Python-modules-commits] [django-pipeline] 01/01: Work around random build failures

Brian May bam at moszumanska.debian.org
Fri Mar 10 22:44:27 UTC 2017


This is an automated email from the git hooks/post-receive script.

bam pushed a commit to branch master
in repository django-pipeline.

commit dc63e77d984f5f9878927c5157c92bb134ccf63e
Author: Brian May <bam at debian.org>
Date:   Fri Mar 10 18:42:12 2017 +1100

    Work around random build failures
    
    As documented here:
    https://github.com/jazzband/django-pipeline/issues/622
    
    Rerunning certain tests by themselves would result in a reproducible
    test failure, every time:
    
        git clean -fxd
        PYTHONPATH=. /usr/bin/django-admin test -v3 --settings=tests.settings
        tests.tests.test_views.ServeStaticViewsTest
    
    The error being:
    
        OSError: [Errno 2] No such file or directory:
        '/build/django-pipeline-1.6.8/tests/static'
    
    I believe this was random was because the order of the tests is random,
    and most of the time a test runs first that creates the required
    directory.
    
    This patch calls collectstatic to ensure the directory is always created
    before running any tests.
---
 debian/changelog | 6 ++++++
 debian/rules     | 1 +
 2 files changed, 7 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 2cc170e..b945c81 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+django-pipeline (1.6.8-3) unstable; urgency=medium
+
+  * Work around for random build failures. Closes: #851722.
+
+ -- Brian May <bam at debian.org>  Fri, 10 Mar 2017 18:54:37 +1100
+
 django-pipeline (1.6.8-2) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/rules b/debian/rules
index dc35e19..26eff8b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,4 +21,5 @@ override_dh_installchangelogs:
 	dh_installchangelogs -- HISTORY.rst
 
 override_dh_auto_test:
+	PYTHONPATH=. /usr/bin/django-admin collectstatic --settings=tests.settings --noinput
 	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="PYTHONPATH=. python{version} /usr/bin/django-admin test --settings=tests.settings" dh_auto_test

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-pipeline.git



More information about the Python-modules-commits mailing list