Enable tests for xauth package

  • Done
  • quality assurance status badge
Details
3 participants
  • Arun Isaac
  • Kei Kebreau
  • Kei Kebreau
Owner
unassigned
Submitted by
Kei Kebreau
Severity
normal

Debbugs page

Kei Kebreau wrote 8 years ago
(address . guix-patches@gnu.org)
87h8yp76kj.fsf@openmailbox.org
The subject is self-explanatory.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlleg/wACgkQ5qXuPBlG
eg1StQ/9HyqAGspnk8t8XrHlALqB69oM7Xi6K0B7178tEn1XnDc5x3f59oqGww/M
yWy7wiVw4b+c0HcvL3gNKbIaIrOwPFkCqQmRqccAOoYAbTKJB/cHzCPPJReLwopy
Flg9M4AT6rPd/R7KsRJmkuAvJzxwaJd9X4ZiAAkaNPHI7UaBZePNaphFc8qzp0xy
3Xi/IChfiyf0Pl54Qp1BMJxa08+sSbo3ptskV9tbYs1p7pxEFUKCZ0SCB4puNR1+
SMY4b/JmA6lTFLb6o0GMIPfBE6qikCYe3K/krmcQWiuZzzJhyULhlDrrvdM1qow9
HDaSLNUpcz63vQCke6jEQj4rJUgMR0OpXcG6rZ6BmG/W9TFHX1cNNSCV+BwdxHUT
kizsXKQSqIWoJl26r/QyLE34Y2QLlaofgMEF6o2HfKmY40FX5V/wI5O+YpjgYgaq
9MdM+FsT1UCPLm1FxHxX2J5xgk69Nm5lJ17FY3S006Iz1O9r+2NWMm3D0vPOsZs/
rAkOoTdZZao0/u5aBZOAIMSD5Zl0fuaH4S6dQm9cgAuZGo2BVUyfkGCUkNE11xYk
WV9M0dRtK9JJ8pPKiltx3O2tV91gsUt5jj41GAaA6lcCMYaVztzc6VJrplYdGIlV
zgfMD9Z4bxlXthe1nq2f4aW0ISNsulHH/AM7HBZa1QFWPBAWnH0=
=ty1Y
-----END PGP SIGNATURE-----

Kei Kebreau wrote 8 years ago
[PATCH 1/2] gnu: Add cmdtest.
(address . 27599@debbugs.gnu.org)(name . Kei Kebreau)(address . kei@openmailbox.org)
20170706184206.11315-1-kei@openmailbox.org
* gnu/packages/check.scm (cmdtest): New variable.
---
gnu/packages/check.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 4b59ac567..20a76a554 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017 Kei Kebreau <kei@openmailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -34,6 +35,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system python)
#:use-module (guix build-system trivial))
(define-public check
@@ -154,6 +156,33 @@ supervised tests.")
multi-paradigm automated test framework for C++ and Objective-C.")
(license boost1.0)))
+(define-public cmdtest
+ (package
+ (name "cmdtest")
+ (version "0.29")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://git.liw.fi/cmdtest/snapshot/"
+ name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1i6gi4yp4qqx1liax098c7nwdb24pghh11xqlrcs7lnhh079rqhb"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:python ,python-2))
+ (propagated-inputs
+ `(("python2-cliapp" ,python2-cliapp)
+ ("python2-markdown" ,python2-markdown)
+ ("python2-ttystatus" ,python2-ttystatus)))
+ (home-page "https://liw.fi/cmdtest/")
+ (synopsis "Black box Unix program tester")
+ (description
+ "@code{cmdtest} black box tests Unix command line tools. Roughly, it is
+given a command line and input files, and the expected output, and it verifies
+that the command line produces the expected output. If not, it reports a
+problem, and shows the differences.")
+ (license gpl3+)))
+
(define-public cmocka
(package
(name "cmocka")
--
2.13.2
Kei Kebreau wrote 8 years ago
[PATCH 2/2] gnu: xauth: Enable tests.
(address . 27599@debbugs.gnu.org)(name . Kei Kebreau)(address . kei@openmailbox.org)
20170706184206.11315-2-kei@openmailbox.org
* gnu/packages/xorg.scm (xauth)[arguments]: Enable tests.
[native-inputs]: Add cmdtest.
---
gnu/packages/xorg.scm | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index c6d194622..c44b98aaf 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -41,6 +41,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages bison)
+ #:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages flex)
#:use-module (gnu packages fontutils)
@@ -1957,11 +1958,8 @@ server.")
("libxau" ,libxau)
("libx11" ,libx11)))
(native-inputs
- `(("pkg-config" ,pkg-config)))
-
- ;; FIXME: The test suite needs http://liw.fi/cmdtest/
- (arguments `(#:tests? #f))
-
+ `(("cmdtest" ,cmdtest)
+ ("pkg-config" ,pkg-config)))
(home-page "https://www.x.org/wiki/")
(synopsis "X authority file utility")
(description
--
2.13.2
Arun Isaac wrote 8 years ago
Re: [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
(name . Kei Kebreau)(address . kei@openmailbox.org)(address . 27599@debbugs.gnu.org)
fe25af89.AEMAMoforQcAAAAAAAAAAAPR3_IAAAACwQwAAAAAAAW9WABZXqQn@mailjet.com
Toggle quote (15 lines)
> +(define-public cmdtest
> + (package
> + (name "cmdtest")
> + (version "0.29")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append "http://git.liw.fi/cmdtest/snapshot/"
> + name "-" version ".tar.gz"))
> + (sha256
> + (base32
> + "1i6gi4yp4qqx1liax098c7nwdb24pghh11xqlrcs7lnhh079rqhb"))))
> + (build-system python-build-system)
> + (arguments
> + `(#:python ,python-2))

Could you try packaging the tests as well? The #:test-target should be
"check".

Toggle quote (6 lines)
> + (description
> + "@code{cmdtest} black box tests Unix command line tools. Roughly, it is
> +given a command line and input files, and the expected output, and it verifies
> +that the command line produces the expected output. If not, it reports a
> +problem, and shows the differences.")

The first sentence of the description should be a full sentence.
Kei Kebreau wrote 8 years ago
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 27599@debbugs.gnu.org)
87d19d6ouj.fsf@openmailbox.org
Arun Isaac <arunisaac@systemreboot.net> writes:

Toggle quote (19 lines)
>> +(define-public cmdtest
>> + (package
>> + (name "cmdtest")
>> + (version "0.29")
>> + (source (origin
>> + (method url-fetch)
>> + (uri (string-append "http://git.liw.fi/cmdtest/snapshot/"
>> + name "-" version ".tar.gz"))
>> + (sha256
>> + (base32
>> + "1i6gi4yp4qqx1liax098c7nwdb24pghh11xqlrcs7lnhh079rqhb"))))
>> + (build-system python-build-system)
>> + (arguments
>> + `(#:python ,python-2))
>
> Could you try packaging the tests as well? The #:test-target should be
> "check".
>

Thanks for the heads up here. I'm going to see what's wrong with the
test suite now.

Toggle quote (8 lines)
>> + (description
>> + "@code{cmdtest} black box tests Unix command line tools. Roughly, it is
>> +given a command line and input files, and the expected output, and it verifies
>> +that the command line produces the expected output. If not, it reports a
>> +problem, and shows the differences.")
>
> The first sentence of the description should be a full sentence.

That could be interpreted as a sentence, though I agree it's rough. I'll
replace it in the next patch.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlle3bQACgkQ5qXuPBlG
eg2eaRAAlj4Bvk22XwCr5Yn4iHK2Wb+BrOFQ3gc1oiMN5+t1CEOlLCoY0/MREnK1
IzVEs/FgjLeLhnrWiDcnEGPNcSCTB2O+kIkj9yR5ehLvuaAbAlXIGsa52nHwj+Av
jiFGSZpPr6amGz3o4sRorbs4zmNO0gcuE9rJbYhlt/jVzNI82OZtcB7gxTwm9Q7Z
3lFe3sr96mzYhX4ehtlAxU51/xWeiIZdSIecrv4pL+drB9jY2IP1GqgZc57xEAgF
RI3ALhtjmqM3ZWVHx8pS4wcdb1x+0XBu09uabV1I1qf9E/U4iIAK35nI91qfnpha
U0Jmk0JH6IznH2FbAHCNP4MWQe/D+SgNs1aO9ceAITr6DgebuITOGYcF4PZfY1++
omSBmbyMA3IkvtbCLNW5AgcMP0DZdglqL8aH5TPJ8bXUVcXEhzbb1Hv1gbN3AD9d
6Bk+Uy8l0YUhetRUcBtOikYb2VCuIBht2ENdnIRF8RVS9LSkf/tzzPawL1SfPxcL
TZuqmrefO9Zveo+g+RccVLZ9uluK9zWXq5to81XujREkruhu4Kdq1MYQt3SApMhU
RR1wBVyjTRXEW8QEhvC80ZRBcez9xzImrfH1GoYz5QNnJtk6Gn94n2bUFL2CYpqs
WpANppotNrZs9mNzJxge5+1qHouAsiWQz/4az6IPmZ32s971D9A=
=lat9
-----END PGP SIGNATURE-----

Kei Kebreau wrote 8 years ago
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 27599@debbugs.gnu.org)
8760f46x2a.fsf@openmailbox.org
Kei Kebreau <kei@openmailbox.org> writes:

Toggle quote (25 lines)
> Arun Isaac <arunisaac@systemreboot.net> writes:
>
>>> +(define-public cmdtest
>>> + (package
>>> + (name "cmdtest")
>>> + (version "0.29")
>>> + (source (origin
>>> + (method url-fetch)
>>> + (uri (string-append "http://git.liw.fi/cmdtest/snapshot/"
>>> + name "-" version ".tar.gz"))
>>> + (sha256
>>> + (base32
>>> + "1i6gi4yp4qqx1liax098c7nwdb24pghh11xqlrcs7lnhh079rqhb"))))
>>> + (build-system python-build-system)
>>> + (arguments
>>> + `(#:python ,python-2))
>>
>> Could you try packaging the tests as well? The #:test-target should be
>> "check".
>>
>
> Thanks for the heads up here. I'm going to see what's wrong with the
> test suite now.
>

I can't figure out what's going wrong with the test suite. Perhaps
someone familiar with the Coverage Test Runner module in python can be
of assistance.

Toggle quote (12 lines)
>>> + (description
>>> + "@code{cmdtest} black box tests Unix command line tools.
>>> Roughly, it is
>>> +given a command line and input files, and the expected output, and
>>> it verifies
>>> +that the command line produces the expected output. If not, it reports a
>>> +problem, and shows the differences.")
>>
>> The first sentence of the description should be a full sentence.
>
> That could be interpreted as a sentence, though I agree it's rough. I'll
> replace it in the next patch.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAllftB0ACgkQ5qXuPBlG
eg15wg/5AYTeVjEdc+T988fHwoKKeT8Lu4GexQQTT+IHVmoLFhv53txcLuwTj84g
xF8GSvmprviBn/rFhQqbZQ+mIzOCI1vyUwP7lQUKYvnQWcScdHU17hQgK5NN8blF
jlQtxN/YJ80oLkM8GMc67Xcc+Viwipnyom/2tqULKJiXrlqGT89Wu30d1UY9ADjl
nN1QS8l4+k7n+CfqtlHth9greJirPffcE7zY3MHBgiYqkFgsMLMELPrmVhrxaQKT
aYEQrsp64uAxDSchbMNd9T6zGrxu1sm+YIm1GsEWU5iOzj6HDJoe9J4HvHsXEnS9
brhFEebnVrzEKKzGGyBDu87orjTAeMsgMKwm7dAwqIZbpo4DVONkUpALWQKgKN2z
2zLPyXP4mcMcMJ+o6F46celBLyrNl3yE7ReEXHdnYuvlpQq+vfFBj+9OkUeY2ijb
vObiMti8dbKheFCxLsyXWl/pSCnkungF2wfGGyZ4b/Ti+IFJJdR9Rmnuv+u7MB8u
rE8lQh110zq1fSGLcrjG1DxvUPlG/U5QlMyJgn8PR2h0o4+91Dirkr4JUY/OYd1k
msW66+Uuq84sN+4l/DABLgwnxoKHvrZd1GgK8q+TEAOK41dU1Twcj7NppyxqaFSL
5FMQEBq/LW43heMYXLJQMXigNF+dDi+yZIEFux15KcrnwZD3now=
=Z0Ck
-----END PGP SIGNATURE-----

Arun Isaac wrote 8 years ago
(name . Kei Kebreau)(address . kei@openmailbox.org)(address . 27599@debbugs.gnu.org)
1dbd9df3.AEAAMkmS1QYAAAAAAAAAAAPR3_IAAAACwQwAAAAAAAW9WABZYG_T@mailjet.com
Toggle quote (4 lines)
> I can't figure out what's going wrong with the test suite. Perhaps
> someone familiar with the Coverage Test Runner module in python can be
> of assistance.

I've used CoverageTestRunner before for packaging obnam's tests. Let me
try this one and get back to you.
Arun Isaac wrote 8 years ago
(name . Kei Kebreau)(address . kei@openmailbox.org)(address . 27599@debbugs.gnu.org)
051619cb.AEMAMuYKo5QAAAAAAAAAAAPR3_IAAAACwQwAAAAAAAW9WABZYQpN@mailjet.com
Toggle quote (4 lines)
> I can't figure out what's going wrong with the test suite. Perhaps
> someone familiar with the Coverage Test Runner module in python can be
> of assistance.

I made some progress. Here are the arguments I used.

(arguments
`(#:python ,python-2
#:phases
(modify-phases %standard-phases
;; check phase needs to be run before the build phase. If not, the
;; coverage test runner looks for tests for the built source files,
;; and fails.
(delete 'check)
(add-before 'build 'check
(lambda _
(substitute* "yarn"
(("/bin/sh") (which "sh")))
(zero? (system* "python" "setup.py" "check")))))))

However, there is still one (hopefully) last test that is failing. This
happens when `python setup.py check' runs `./cmdtest yarn.tests'. I'm
not able to figure out exactly what the issue is. But, I noticed that
this test fails only in the build environment, and runs fine in my user
environment. So, this must be due to something that is missing in the
build environment -- possibly some environment variable. Check it out
and let me know. I will also continue trying.
Arun Isaac wrote 8 years ago
(name . Kei Kebreau)(address . kei@openmailbox.org)(address . 27599@debbugs.gnu.org)
2da4aa7d.AEQAO-J3svAAAAAAAAAAAAPR3_IAAAACwQwAAAAAAAW9WABZnoqs@mailjet.com
I've figured out all the problems with cmdtest's tests. Please find
below the arguments I used:

(arguments
`(#:python ,python-2
#:phases
(modify-phases %standard-phases
;; check phase needs to be run before the build phase. If not, the
;; coverage test runner looks for tests for the built source files,
;; and fails.
(delete 'check)
(add-before 'build 'check
(lambda _
(substitute* "yarn"
(("/bin/sh") (which "sh")))
;; yarn uses python2-ttystatus to print messages.
;; python2-ttystatus requires /dev/tty which is not present in
;; the build environment. Hence assuming-failure test fails.
(delete-file "yarn.tests/assuming-failure.script")
(delete-file "yarn.tests/assuming-failure.stdout")
(zero? (system* "python" "setup.py" "check")))))))

Do complete the patchset, with changes mentioned earlier, and
push. Thanks!
Kei Kebreau wrote 8 years ago
(address . 27599-done@debbugs.gnu.org)
87wp5jyk5g.fsf@posteo.net
I thought I had closed this...
These patches have been pushed to master.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 27599@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 27599
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help