unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add googletest
@ 2016-05-30 20:44 Lukas Gradl
  2016-05-31 13:53 ` Lukas Gradl
  0 siblings, 1 reply; 13+ messages in thread
From: Lukas Gradl @ 2016-05-30 20:44 UTC (permalink / raw)
  To: guix-devel

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


Hello Guix,

This patch adds googletest, a native-input for the c/c++ version of
msgpack (coming soon).

There is no "install" target.  At the moment the patch copies the build
results to out/lib and the include directory of the source tree to
out/include.  I am not sure if this is enough or if something else needs
to be installed.  Opinions are welcome!

Thank you!


[-- Attachment #2: 0001-gnu-check-Add-googletest.patch --]
[-- Type: text/x-patch, Size: 2863 bytes --]

From 0560038dd1c529cca46e31c6afbb5cd16808db43 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Mon, 30 May 2016 15:35:10 -0500
Subject: [PATCH] gnu: check: Add googletest.

* gnu/packages/check.scm (googletest): New variable.
---
 gnu/packages/check.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 9eef7a9..f6b586a 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,42 @@ 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"))
+       (sha256
+        (base32
+         "1k0nf1l9cb3prdmsvaajl5i31bx86c1mw0d5jgzykz7rzm36afpp"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("python-2" ,python-2)))
+    (arguments
+     `(#:tests? #f
+       ;#:configure-flags '("-Dgtest_build_tests=ON")
+       #:phases (modify-phases %standard-phases
+                  (replace 'install
+                    (lambda _
+                      (let ((out (assoc-ref %outputs "out")))
+                        (and
+                         (mkdir-p (string-append out "/lib"))
+                         (mkdir-p (string-append out "/include"))
+                         (zero? (system* "cp" "libgtest.a" "libgtest_main.a"
+                                         (string-append out "/lib")))
+                         (system* "ls")
+                         (zero? (system* "ls" "..")))))))))
+    (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


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

end of thread, other threads:[~2016-06-09 22:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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