diff options
author | Christopher Baines <mail@cbaines.net> | 2019-01-03 21:20:33 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-01-25 22:00:05 +0000 |
commit | dd7bc92afcd4b69849fc55041ac0261315cde2da (patch) | |
tree | afa2cef4c633ed73aa75021538aa7f21908366af /gnu/packages/web.scm | |
parent | 7e309e8a8d7882516b1d7f4815daf52f296bd46f (diff) | |
download | guix-dd7bc92afcd4b69849fc55041ac0261315cde2da.tar guix-dd7bc92afcd4b69849fc55041ac0261315cde2da.tar.gz |
gnu: linkchecker: Fix most test failures.
Add a patch to skip more tests that require the network. Along with some other
changes, this gets all but of one of the tests passing.
The remaining test is broken due to a problem with the Python package in Guix,
which is fixed by [1] which is currently on the core-updates branch. This
patch doesn't work on core-updates due to python2-miniboa not being present.
1: d453b0e11d3f001a8160a7d126fdbf40e45d5042
* gnu/packages/python.scm (linkchecker)[source]: Add patch.
[native-inputs]: Add more inputs required for the tests.
[arguments]: Enable the tests, move the 'check phase after 'install. Test
using the installed software, and use py.test.
Diffstat (limited to 'gnu/packages/web.scm')
-rw-r--r-- | gnu/packages/web.scm | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index d3693dff05..776027ced7 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -5330,6 +5330,9 @@ Instagram and YouTube.") (uri (git-reference (url "https://github.com/linkchecker/linkchecker") (commit (string-append "v" version)))) + (patches + (search-patches + "linkchecker-mark-more-tests-that-require-the-network.patch")) (file-name (git-file-name name version)) (sha256 (base32 @@ -5339,8 +5342,32 @@ Instagram and YouTube.") `(("python2-dnspython" ,python2-dnspython) ("python2-pyxdg" ,python2-pyxdg) ("python2-requests" ,python2-requests))) + (native-inputs + `(("gettext" ,gettext-minimal) + ("python2-pytest" ,python2-pytest) + ("python2-miniboa" ,python2-miniboa) + ("python2-parameterized" ,python2-parameterized))) (arguments - `(#:python ,python-2)) + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + ;; Move the 'check phase to after 'install, so that the installed + ;; library can be used + (delete 'check) + (add-after 'install 'check + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; Set PYTHONPATH so that the installed linkchecker is used + (setenv "PYTHONPATH" + (string-append out "/lib/python2.7/site-packages" + ":" + (getenv "PYTHONPATH"))) + ;; Remove this directory to avoid it being used when running + ;; the tests + (delete-file-recursively "linkcheck") + + (invoke "py.test" "tests")) + #t))))) (home-page "https://linkcheck.github.io/linkchecker") (synopsis "Check websites for broken links") (description "LinkChecker is a website validator. It checks for broken |