[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#820029: RFS: grip/4.1.0-1 [ITP]



On Tue, Apr 05, 2016 at 11:11:40PM -0300, Tiago Ilieve wrote:
> Hi Mattia,
> 
> As the new version of "python-responses" has hit unstable, the test
> were enabled with the following patch:
> 
> http://paste.debian.net/424537/

you forgot to add python-path-and-address and python3-path-and-address
to build-deps.

And also I now notice that you're missing a python (or python-all)
build-dep, which is kind of redundant but still mandated.

> The "--ignore=tests/test_cli.py" argument was added because this file
> consists of functional tests (DEP-8) that should not run on build
> time. The problem now is the following error:
> 
> http://paste.debian.net/424538/
> 
> Adding an "import pdb; pdb.set_trace()" in the test that is failing, I
> could see that it is looking for this README file in
> "/vagrant/grip/deb-grip/.pybuild/pythonX.Y_3.5/build/tests/input/default".
> This file exists on the upstream source[1] and the tests doesn't fail
> when I run them locally. My guess is that it is not being copied by
> "pybuild" (actually, looks like the entire "tests/" directory isn't),
> thus causing the test to fail during build.
> 
> What should I do in this case? Would be sensible to skip this test?

umh, so, tests are not copied, ok, that seems to be normal for pybuild
and there is even an example about how to deal with it.
but also copying tests/ seems to be not enough, as it seems to need the
README.md too ?!?

so, I did this, I used some pybuild black magic (and enabled the
verbose mode as I was having more troubles than usual) and removed the
override.

With the following git diff the tests passes.

BTW, i really much don't mind WIP commits instead of sending diffs to
paste.d.n ;)


mattia@chase ~/devel/RFS/grip/grip (git)-[debian/unstable] % git diff
diff --git a/debian/control b/debian/control
index f4450b5..cb6b9e1 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,17 @@ Priority: optional
 Maintainer: Tiago Ilieve <tiago.myhro@gmail.com>
 Build-Depends: debhelper (>= 9),
                dh-python,
+               python-docopt,
+               python-flask,
+               python-path-and-address,
+               python-pytest,
+               python-responses (>= 0.5.0),
                python3-all,
+               python3-docopt,
+               python3-flask,
+               python3-path-and-address,
+               python3-pytest,
+               python3-responses (>= 0.5.0),
                python3-setuptools
 Build-Depends-Indep: txt2man
 Standards-Version: 3.9.7
diff --git a/debian/rules b/debian/rules
index a2f0200..9d6adca 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,12 @@
 #!/usr/bin/make -f
 
+export PYBUILD_VERBOSE=1
 export PYBUILD_NAME=grip
+export PYBUILD_BEFORE_TEST_python3=cp -r {dir}/tests {dir}/README.md {build_dir}
+export PYBUILD_AFTER_TEST=rm -rf {build_dir}/tests {build_dir}/README.md
+export PYBUILD_TEST_PYTEST=1
+# The '-m "not assumption"' argument prevents external calls to GitHub API
+export PYBUILD_TEST_ARGS=-m "not assumption" --ignore=tests/test_cli.py
 
 %:
        dh $@ --with python3 --buildsystem=pybuild
@@ -15,10 +21,3 @@ override_dh_auto_install:
        # Remove auto-generated entry point script which wil be replaced by a
        # custom one
        rm debian/grip/usr/bin/grip
-
-
-override_dh_auto_test:
-       # Tests need an updated 'python-responses' library
-       #
-       # The '-m "not assumption"' argument prevents external calls to GitHub API
-       #pybuild --test-pytest --test-args='-m "not assumption"'


-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  http://mapreri.org                              : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-

Attachment: signature.asc
Description: PGP signature


Reply to: