unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lukas Gradl <lgradl@openmailbox.org>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] Add googletest
Date: Thu, 09 Jun 2016 17:17:37 -0500	[thread overview]
Message-ID: <87inxihuri.fsf@openmailbox.org> (raw)
In-Reply-To: <20160609184054.GB513@debian-netbook> (Efraim Flashner's message of "Thu, 9 Jun 2016 21:40:54 +0300")

Efraim Flashner <efraim@flashner.co.il> writes:

> On Sun, Jun 05, 2016 at 04:09:28PM -0500, Lukas Gradl wrote:
>> Efraim Flashner <efraim@flashner.co.il> writes:
>> 
>> > On Thu, Jun 02, 2016 at 10:44:58AM -0500, Lukas Gradl wrote:
>> >> 
>> >> Hi Leo,
>> >> 
>> > ...
>> >>
>> >> The tool "pump.py" is distributed with the Googletest source.  It
>> >> appears to be a part of the source rather than a bundeled dependency and
>> >> the only reference to it that I found was in Googletest, so I would
>> >> assume it is a part of Googletest.  Therefore I did not create a
>> >> seperate package for that, but used the one provided in the Googletest
>> >> source tree.  With that, the pre-generated headers can be reproduced.
>> >> The attached patch does that.
>> >> 
>> >> Thank you!
>> >> 
>> >
>> > A couple last things I found, otherwise it looks great.
>> >
>> >> From 7d4aaba39821130ba824c4b2f8bd236e0d1f1639 Mon Sep 17 00:00:00 2001
>> >> From: Lukas Gradl <lgradl@openmailbox.org>
>> >> Date: Thu, 2 Jun 2016 10:36:17 -0500
>> >> Subject: [PATCH] gnu: Add googletest.
>> >> 
>> >> * gnu/packages/check.scm (googletest): New variable.
>> >> ---
>> >>  gnu/packages/check.scm | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++
>> >>  1 file changed, 64 insertions(+)
>> >> 
>> >> diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
>> >> index 9eef7a9..4971c71 100644
>> >> --- a/gnu/packages/check.scm
>> >> +++ b/gnu/packages/check.scm
>> >> @@ -5,6 +5,7 @@
>> >>  ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
>> >>  ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
>> >>  ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
>> >> +;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
>> >>  ;;;
>> >>  ;;; This file is part of GNU Guix.
>> >>  ;;;
>> >> @@ -24,6 +25,7 @@
>> >>  (define-module (gnu packages check)
>> >>    #:use-module (gnu packages)
>> >>    #:use-module (gnu packages autotools)
>> >> +  #:use-module (gnu packages python)
>> >>    #:use-module (guix licenses)
>> >>    #:use-module (guix packages)
>> >>    #:use-module (guix download)
>> >> @@ -193,3 +195,65 @@ in the code.  Cppcheck primarily detects the types of bugs that the compilers
>> >>  normally do not detect.  The goal is to detect only real errors in the code
>> >>  (i.e. have zero false positives).")
>> >>      (license gpl3+)))
>> >> +
>> >> +(define-public googletest
>> >> +  (package
>> >> +    (name "googletest")
>> >> +    (version "1.7.0")
>> >> +    (source
>> >> +     (origin
>> >> +       (method url-fetch)
>> >> +       (uri
>> >> +        (string-append
>> >> +         "https://github.com/google/googletest/archive/release-"
>> >> +         version ".tar.gz"))
>> >
>> > add:    (file-name (string-append name "-" version ".tar.gz"))
>> 
>> I added it.
>> 
>> >
>> >> +       (sha256
>> >> +        (base32
>> >> +         "1k0nf1l9cb3prdmsvaajl5i31bx86c1mw0d5jgzykz7rzm36afpp"))))
>> >> +    (build-system gnu-build-system)
>> >> +    (native-inputs
>> >> +     `(("python-2" ,python-2)
>> >> +       ("autoconf" ,autoconf)
>> >> +       ("automake" ,automake)
>> >> +       ("libtool" ,libtool)))
>> >> +    (arguments
>> >> +     `( #:phases
>> >> +       (modify-phases %standard-phases
>> >> +         (add-before 'configure 'autoconf
>> >> +                      (lambda _
>> >> +                        (zero? (system* "autoreconf" "-vfi"))))
>> >> +         (add-before 'autoconf 'generate-headers
>> >> +           (lambda _
>> >> +             (begin
>> >> +               (delete-file "include/gtest/gtest-param-test.h")
>> >> +               (system* "python2" "scripts/pump.py"
>> >> +                        "include/gtest/gtest-param-test.h.pump")
>> >> +               (delete-file "include/gtest/internal/gtest-tuple.h")
>> >> +               (system* "python2" "scripts/pump.py"
>> >> +                        "include/gtest//internal/gtest-tuple.h.pump")
>> >> +               (delete-file
>> >> +                "include/gtest/internal/gtest-param-util-generated.h")
>> >> +               (system*
>> >> +                "python2" "scripts/pump.py"
>> >> +                "include/gtest/internal/gtest-param-util-generated.h.pump")
>> >> +               (delete-file "include/gtest/internal/gtest-type-util.h")
>> >> +               (system* "python2" "scripts/pump.py"
>> >> +                        "include/gtest/internal/gtest-type-util.h.pump"))))
>> >> +         (replace 'install
>> >> +           (lambda _
>> >> +             (let ((out (assoc-ref %outputs "out"))
>> >> +                   (version version))
>> >                                       ^
>> > you don't actually use this variable --
>> >
>> 
>> Oh, Sorry about that.  This is a leftover from a previous attemt that I
>> forgot to remove.
>> 
>> >> +               (begin
>> >> +                 (install-file "lib/.libs/libgtest_main.a"
>> >> +                               (string-append out "/lib"))
>> >> +                 (install-file "lib/.libs/libgtest.a"
>> >> +                               (string-append out "/lib"))
>> >> +                 (copy-recursively
>> >> +                  (string-append "include")
>> >
>> > don't need the string-append above
>> >
>> 
>> Same here.
>> 
>> >> +                  (string-append out "/include")))))))))
>> >> +    (home-page "https://github.com/google/googletest/")
>> >> +    (synopsis "Test discovery and XUnit test framework")
>> >> +    (description "Google Test features an XUnit test framework, automated test
>> >> +discovery, death tests, assertions, parameterized tests and XML test report
>> >> +generation.")
>> >> +    (license bsd-3)))
>> >> -- 
>> >> 2.7.4
>> >> 
>> 
>> 
>> Thank you for your review!
>> 
>> An updated patch is attached.
>> 
>> Best,
>> Lukas
>> 
>> 
>
>> From 54223517c0c05b5c5bfcca055c8b12cb650c8b40 Mon Sep 17 00:00:00 2001
>> From: Lukas Gradl <lgradl@openmailbox.org>
>> Date: Sun, 5 Jun 2016 16:03:56 -0500
>> Subject: [PATCH] gnu: Add googletest.
>> 
>> * gnu/packages/check.scm (googletest): New variable.
>> ---
>>  gnu/packages/check.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 63 insertions(+)
>> 
>> diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
>> index 9eef7a9..64b5006 100644
>> --- a/gnu/packages/check.scm
>> +++ b/gnu/packages/check.scm
>> @@ -5,6 +5,7 @@
>>  ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
>>  ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
>>  ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
>> +;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
>>  ;;;
>>  ;;; This file is part of GNU Guix.
>>  ;;;
>> @@ -24,6 +25,7 @@
>>  (define-module (gnu packages check)
>>    #:use-module (gnu packages)
>>    #:use-module (gnu packages autotools)
>> +  #:use-module (gnu packages python)
>>    #:use-module (guix licenses)
>>    #:use-module (guix packages)
>>    #:use-module (guix download)
>> @@ -193,3 +195,64 @@ in the code.  Cppcheck primarily detects the types of bugs that the compilers
>>  normally do not detect.  The goal is to detect only real errors in the code
>>  (i.e. have zero false positives).")
>>      (license gpl3+)))
>> +
>> +(define-public googletest
>> +  (package
>> +    (name "googletest")
>> +    (version "1.7.0")
>> +    (source
>> +     (origin
>> +       (method url-fetch)
>> +       (uri
>> +        (string-append
>> +         "https://github.com/google/googletest/archive/release-"
>> +         version ".tar.gz"))
>> +       (file-name (string-append name "-" version ".tar.gz"))
>> +       (sha256
>> +        (base32
>> +         "1k0nf1l9cb3prdmsvaajl5i31bx86c1mw0d5jgzykz7rzm36afpp"))))
>> +    (build-system gnu-build-system)
>> +    (native-inputs
>> +     `(("python-2" ,python-2)
>> +       ("autoconf" ,autoconf)
>> +       ("automake" ,automake)
>> +       ("libtool" ,libtool)))
>> +    (arguments
>> +     `(#:phases
>> +       (modify-phases %standard-phases
>> +         (add-before 'configure 'autoconf
>> +                      (lambda _
>> +                        (zero? (system* "autoreconf" "-vfi"))))
>> +         (add-before 'autoconf 'generate-headers
>> +           (lambda _
>> +             (begin
>> +               (delete-file "include/gtest/gtest-param-test.h")
>> +               (system* "python2" "scripts/pump.py"
>> +                        "include/gtest/gtest-param-test.h.pump")
>> +               (delete-file "include/gtest/internal/gtest-tuple.h")
>> +               (system* "python2" "scripts/pump.py"
>> +                        "include/gtest//internal/gtest-tuple.h.pump")
>> +               (delete-file
>> +                "include/gtest/internal/gtest-param-util-generated.h")
>> +               (system*
>> +                "python2" "scripts/pump.py"
>> +                "include/gtest/internal/gtest-param-util-generated.h.pump")
>> +               (delete-file "include/gtest/internal/gtest-type-util.h")
>> +               (system* "python2" "scripts/pump.py"
>> +                        "include/gtest/internal/gtest-type-util.h.pump"))))
>> +         (replace 'install
>> +           (lambda _
>> +             (let ((out (assoc-ref %outputs "out")))
>> +               (begin
>> +                 (install-file "lib/.libs/libgtest_main.a"
>> +                               (string-append out "/lib"))
>> +                 (install-file "lib/.libs/libgtest.a"
>> +                               (string-append out "/lib"))
>> +                 (copy-recursively "include"
>> +                  (string-append out "/include")))))))))
>> +    (home-page "https://github.com/google/googletest/")
>> +    (synopsis "Test discovery and XUnit test framework")
>> +    (description "Google Test features an XUnit test framework, automated test
>> +discovery, death tests, assertions, parameterized tests and XML test report
>> +generation.")
>> +    (license bsd-3)))
>> -- 
>> 2.7.4
>> 
>
> Patch pushed!

Thank you!

      reply	other threads:[~2016-06-09 22:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30 20:44 [PATCH] Add googletest Lukas Gradl
2016-05-31 13:53 ` Lukas Gradl
2016-05-31 21:44   ` Leo Famulari
2016-06-01  4:48     ` Efraim Flashner
2016-06-02 13:51       ` Lukas Gradl
2016-06-01  7:47     ` Ludovic Courtès
2016-06-01 14:57     ` Lukas Gradl
2016-06-02  1:49       ` Leo Famulari
2016-06-02 15:44         ` Lukas Gradl
2016-06-05 13:12           ` Efraim Flashner
2016-06-05 21:09             ` Lukas Gradl
2016-06-09 18:40               ` Efraim Flashner
2016-06-09 22:17                 ` Lukas Gradl [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87inxihuri.fsf@openmailbox.org \
    --to=lgradl@openmailbox.org \
    --cc=efraim@flashner.co.il \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).