GNU bug report logs - #27599
Enable tests for xauth package

Previous Next

Package: guix-patches;

Reported by: Kei Kebreau <kei <at> openmailbox.org>

Date: Thu, 6 Jul 2017 18:41:02 UTC

Severity: normal

Done: Kei Kebreau <kkebreau <at> posteo.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27599 in the body.
You can then email your comments to 27599 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#27599; Package guix-patches. (Thu, 06 Jul 2017 18:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kei Kebreau <kei <at> openmailbox.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 06 Jul 2017 18:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kei Kebreau <kei <at> openmailbox.org>
To: guix-patches <at> gnu.org
Subject: Enable tests for xauth package
Date: Thu, 06 Jul 2017 14:39:56 -0400
[Message part 1 (text/plain, inline)]
The subject is self-explanatory.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#27599; Package guix-patches. (Thu, 06 Jul 2017 18:43:02 GMT) Full text and rfc822 format available.

Message #8 received at 27599 <at> debbugs.gnu.org (full text, mbox):

From: Kei Kebreau <kei <at> openmailbox.org>
To: 27599 <at> debbugs.gnu.org
Cc: Kei Kebreau <kei <at> openmailbox.org>
Subject: [PATCH 1/2] gnu: Add cmdtest.
Date: Thu,  6 Jul 2017 14:42:05 -0400
* gnu/packages/check.scm (cmdtest): New variable.
---
 gnu/packages/check.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

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 <at> gnu.org>
 ;;; Copyright © 2016 Lukas Gradl <lgradl <at> openmailbox.org>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe <at> gmail.com>
+;;; Copyright © 2017 Kei Kebreau <kei <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#27599; Package guix-patches. (Thu, 06 Jul 2017 18:43:03 GMT) Full text and rfc822 format available.

Message #11 received at 27599 <at> debbugs.gnu.org (full text, mbox):

From: Kei Kebreau <kei <at> openmailbox.org>
To: 27599 <at> debbugs.gnu.org
Cc: Kei Kebreau <kei <at> openmailbox.org>
Subject: [PATCH 2/2] gnu: xauth: Enable tests.
Date: Thu,  6 Jul 2017 14:42:06 -0400
* gnu/packages/xorg.scm (xauth)[arguments]: Enable tests.
[native-inputs]: Add cmdtest.
---
 gnu/packages/xorg.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#27599; Package guix-patches. (Thu, 06 Jul 2017 20:58:01 GMT) Full text and rfc822 format available.

Message #14 received at 27599 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Kei Kebreau <kei <at> openmailbox.org>
Cc: 27599 <at> debbugs.gnu.org
Subject: Re: [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
Date: Fri, 07 Jul 2017 02:27:04 +0530
> +(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".

> +    (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.




Information forwarded to guix-patches <at> gnu.org:
bug#27599; Package guix-patches. (Fri, 07 Jul 2017 01:04:02 GMT) Full text and rfc822 format available.

Message #17 received at 27599 <at> debbugs.gnu.org (full text, mbox):

From: Kei Kebreau <kei <at> openmailbox.org>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 27599 <at> debbugs.gnu.org
Subject: Re: [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
Date: Thu, 06 Jul 2017 21:02:44 -0400
[Message part 1 (text/plain, inline)]
Arun Isaac <arunisaac <at> 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.

>> +    (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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#27599; Package guix-patches. (Fri, 07 Jul 2017 16:19:01 GMT) Full text and rfc822 format available.

Message #20 received at 27599 <at> debbugs.gnu.org (full text, mbox):

From: Kei Kebreau <kei <at> openmailbox.org>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 27599 <at> debbugs.gnu.org
Subject: Re: [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
Date: Fri, 07 Jul 2017 12:17:33 -0400
[Message part 1 (text/plain, inline)]
Kei Kebreau <kei <at> openmailbox.org> writes:

> Arun Isaac <arunisaac <at> 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.

>>> +    (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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#27599; Package guix-patches. (Sat, 08 Jul 2017 05:39:01 GMT) Full text and rfc822 format available.

Message #23 received at 27599 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Kei Kebreau <kei <at> openmailbox.org>
Cc: 27599 <at> debbugs.gnu.org
Subject: Re: [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
Date: Sat, 08 Jul 2017 11:08:05 +0530
> 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.




Information forwarded to guix-patches <at> gnu.org:
bug#27599; Package guix-patches. (Sat, 08 Jul 2017 16:38:01 GMT) Full text and rfc822 format available.

Message #26 received at 27599 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Kei Kebreau <kei <at> openmailbox.org>
Cc: 27599 <at> debbugs.gnu.org
Subject: Re: [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
Date: Sat, 08 Jul 2017 22:07:20 +0530
> 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.




Information forwarded to guix-patches <at> gnu.org:
bug#27599; Package guix-patches. (Thu, 24 Aug 2017 08:14:01 GMT) Full text and rfc822 format available.

Message #29 received at 27599 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Kei Kebreau <kei <at> openmailbox.org>
Cc: 27599 <at> debbugs.gnu.org
Subject: Re: [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
Date: Thu, 24 Aug 2017 13:42:57 +0530
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!




Reply sent to Kei Kebreau <kkebreau <at> posteo.net>:
You have taken responsibility. (Thu, 31 Aug 2017 12:53:02 GMT) Full text and rfc822 format available.

Notification sent to Kei Kebreau <kei <at> openmailbox.org>:
bug acknowledged by developer. (Thu, 31 Aug 2017 12:53:02 GMT) Full text and rfc822 format available.

Message #34 received at 27599-done <at> debbugs.gnu.org (full text, mbox):

From: Kei Kebreau <kkebreau <at> posteo.net>
To: 27599-done <at> debbugs.gnu.org
Subject: Re: [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
Date: Thu, 31 Aug 2017 08:52:11 -0400
I thought I had closed this...
These patches have been pushed to master.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 29 Sep 2017 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 181 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.