unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#27599] Enable tests for xauth package
@ 2017-07-06 18:39 Kei Kebreau
  2017-07-06 18:42 ` [bug#27599] [PATCH 1/2] gnu: Add cmdtest Kei Kebreau
  0 siblings, 1 reply; 10+ messages in thread
From: Kei Kebreau @ 2017-07-06 18:39 UTC (permalink / raw)
  To: 27599

[-- Attachment #1: Type: text/plain, Size: 33 bytes --]

The subject is self-explanatory.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
  2017-07-06 18:39 [bug#27599] Enable tests for xauth package Kei Kebreau
@ 2017-07-06 18:42 ` Kei Kebreau
  2017-07-06 18:42   ` [bug#27599] [PATCH 2/2] gnu: xauth: Enable tests Kei Kebreau
                     ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Kei Kebreau @ 2017-07-06 18:42 UTC (permalink / raw)
  To: 27599; +Cc: Kei Kebreau

* 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@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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#27599] [PATCH 2/2] gnu: xauth: Enable tests.
  2017-07-06 18:42 ` [bug#27599] [PATCH 1/2] gnu: Add cmdtest Kei Kebreau
@ 2017-07-06 18:42   ` Kei Kebreau
  2017-07-06 20:57   ` [bug#27599] [PATCH 1/2] gnu: Add cmdtest Arun Isaac
       [not found]   ` <8b934d75.AEMAMoforQgAAAAAAAAAAAPR3_EAAAACwQwAAAAAAAW9WABZXqQn@mailjet.com>
  2 siblings, 0 replies; 10+ messages in thread
From: Kei Kebreau @ 2017-07-06 18:42 UTC (permalink / raw)
  To: 27599; +Cc: Kei Kebreau

* 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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
  2017-07-06 18:42 ` [bug#27599] [PATCH 1/2] gnu: Add cmdtest Kei Kebreau
  2017-07-06 18:42   ` [bug#27599] [PATCH 2/2] gnu: xauth: Enable tests Kei Kebreau
@ 2017-07-06 20:57   ` Arun Isaac
       [not found]   ` <8b934d75.AEMAMoforQgAAAAAAAAAAAPR3_EAAAACwQwAAAAAAAW9WABZXqQn@mailjet.com>
  2 siblings, 0 replies; 10+ messages in thread
From: Arun Isaac @ 2017-07-06 20:57 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: 27599


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
       [not found]   ` <8b934d75.AEMAMoforQgAAAAAAAAAAAPR3_EAAAACwQwAAAAAAAW9WABZXqQn@mailjet.com>
@ 2017-07-07  1:02     ` Kei Kebreau
  2017-07-07 16:17       ` Kei Kebreau
  0 siblings, 1 reply; 10+ messages in thread
From: Kei Kebreau @ 2017-07-07  1:02 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 27599

[-- Attachment #1: Type: text/plain, Size: 1225 bytes --]

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.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
  2017-07-07  1:02     ` Kei Kebreau
@ 2017-07-07 16:17       ` Kei Kebreau
  2017-07-08  5:38         ` Arun Isaac
                           ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Kei Kebreau @ 2017-07-07 16:17 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 27599

[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]

Kei Kebreau <kei@openmailbox.org> writes:

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

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
  2017-07-07 16:17       ` Kei Kebreau
@ 2017-07-08  5:38         ` Arun Isaac
  2017-07-08 16:37         ` Arun Isaac
       [not found]         ` <cu7wp7izxz3.fsf@systemreboot.net>
  2 siblings, 0 replies; 10+ messages in thread
From: Arun Isaac @ 2017-07-08  5:38 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: 27599


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
  2017-07-07 16:17       ` Kei Kebreau
  2017-07-08  5:38         ` Arun Isaac
@ 2017-07-08 16:37         ` Arun Isaac
       [not found]         ` <cu7wp7izxz3.fsf@systemreboot.net>
  2 siblings, 0 replies; 10+ messages in thread
From: Arun Isaac @ 2017-07-08 16:37 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: 27599


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#27599] [PATCH 1/2] gnu: Add cmdtest.
       [not found]         ` <cu7wp7izxz3.fsf@systemreboot.net>
@ 2017-08-24  8:12           ` Arun Isaac
  2017-08-31 12:52             ` bug#27599: " Kei Kebreau
  0 siblings, 1 reply; 10+ messages in thread
From: Arun Isaac @ 2017-08-24  8:12 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: 27599


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!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#27599: [PATCH 1/2] gnu: Add cmdtest.
  2017-08-24  8:12           ` Arun Isaac
@ 2017-08-31 12:52             ` Kei Kebreau
  0 siblings, 0 replies; 10+ messages in thread
From: Kei Kebreau @ 2017-08-31 12:52 UTC (permalink / raw)
  To: 27599-done


I thought I had closed this...
These patches have been pushed to master.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-08-31 12:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-06 18:39 [bug#27599] Enable tests for xauth package Kei Kebreau
2017-07-06 18:42 ` [bug#27599] [PATCH 1/2] gnu: Add cmdtest Kei Kebreau
2017-07-06 18:42   ` [bug#27599] [PATCH 2/2] gnu: xauth: Enable tests Kei Kebreau
2017-07-06 20:57   ` [bug#27599] [PATCH 1/2] gnu: Add cmdtest Arun Isaac
     [not found]   ` <8b934d75.AEMAMoforQgAAAAAAAAAAAPR3_EAAAACwQwAAAAAAAW9WABZXqQn@mailjet.com>
2017-07-07  1:02     ` Kei Kebreau
2017-07-07 16:17       ` Kei Kebreau
2017-07-08  5:38         ` Arun Isaac
2017-07-08 16:37         ` Arun Isaac
     [not found]         ` <cu7wp7izxz3.fsf@systemreboot.net>
2017-08-24  8:12           ` Arun Isaac
2017-08-31 12:52             ` bug#27599: " Kei Kebreau

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).