gnu: python-pandas: Fix build on 32-bit.
[jackhill/guix/guix.git] / gnu / packages / check.scm
CommitLineData
233e7676
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
4ac696c6 3;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
3bfc99c7 4;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
28edab7a 5;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
2259442b 6;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
dd6e70f9 7;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
5f6aba6b 8;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
d8989c23 9;;;
233e7676 10;;; This file is part of GNU Guix.
d8989c23 11;;;
233e7676 12;;; GNU Guix is free software; you can redistribute it and/or modify it
d8989c23
NK
13;;; under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 3 of the License, or (at
15;;; your option) any later version.
16;;;
233e7676 17;;; GNU Guix is distributed in the hope that it will be useful, but
d8989c23
NK
18;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
233e7676 23;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
d8989c23 24
1ffa7090 25(define-module (gnu packages check)
59a43334 26 #:use-module (gnu packages)
f767bcca 27 #:use-module (gnu packages autotools)
5f6aba6b 28 #:use-module (gnu packages python)
5be2931c 29 #:use-module (guix utils)
d8989c23
NK
30 #:use-module (guix licenses)
31 #:use-module (guix packages)
32 #:use-module (guix download)
3bfc99c7 33 #:use-module (guix git-download)
2259442b 34 #:use-module (guix build-system cmake)
3bfc99c7
EB
35 #:use-module (guix build-system gnu)
36 #:use-module (guix build-system trivial))
d8989c23
NK
37
38(define-public check
39 (package
40 (name "check")
f4d9339c 41 (version "0.10.0")
d8989c23
NK
42 (source
43 (origin
44 (method url-fetch)
f4d9339c
EF
45 (uri (string-append "https://github.com/libcheck/check/files/71408/"
46 "/check-" version ".tar.gz"))
d8989c23
NK
47 (sha256
48 (base32
f4d9339c 49 "0lhhywf5nxl3dd0hdakra3aasl590756c9kmvyifb3vgm9k0gxgm"))))
d8989c23 50 (build-system gnu-build-system)
f4d9339c 51 (home-page "https://libcheck.github.io/check/")
35b9e423 52 (synopsis "Unit test framework for C")
d8989c23 53 (description
35b9e423 54 "Check is a unit testing framework for C. It features a simple
d8989c23
NK
55interface for defining unit tests, putting little in the way of the
56developer. Tests are run in a separate address space, so Check can
57catch both assertion failures and code errors that cause segmentation
35b9e423 58faults or other signals. The output from unit tests can be used within
d8989c23
NK
59source code editors and IDEs.")
60 (license lgpl2.1+)))
34352662 61
f767bcca
RW
62(define-public cunit
63 (package
64 (name "cunit")
65 (version "2.1-3")
66 (source
67 (origin
68 (method url-fetch)
69 (uri (string-append "mirror://sourceforge/cunit/CUnit/"
70 version "/CUnit-" version ".tar.bz2"))
71 (sha256
72 (base32
73 "057j82da9vv4li4z5ri3227ybd18nzyq81f6gsvhifs5z0vr3cpm"))))
74 (build-system gnu-build-system)
75 (arguments '(#:phases
76 (alist-cons-before
77 'configure 'autoconf
78 (lambda _
79 (zero? (system* "autoreconf" "-vfi")))
80 %standard-phases)))
81 (native-inputs
82 `(("automake" ,automake)
83 ("autoconf" ,autoconf)
84 ("libtool" ,libtool)))
85 (home-page "http://cunit.sourceforge.net/")
86 (synopsis "Automated testing framework for C")
87 (description
88 "CUnit is a lightweight system for writing, administering, and running
89unit tests in C. It provides C programmers with basic testing functionality
90with a flexible variety of user interfaces.")
91 (license gpl2+)))
92
34352662
JD
93(define-public cppunit
94 (package
95 (name "cppunit")
34a6f4dc 96 (version "1.13.2")
34352662
JD
97 (source (origin
98 (method url-fetch)
34a6f4dc
EF
99 (uri (string-append "http://dev-www.libreoffice.org/src/"
100 name "-" version ".tar.gz"))
34352662
JD
101 (sha256
102 (base32
34a6f4dc 103 "17s2kzmkw3kfjhpp72rfppyd7syr7bdq5s69syj2nvrlwd3d4irz"))))
28edab7a
AE
104 ;; Explicitly link with libdl. This is expected to be done by packages
105 ;; relying on cppunit for their tests. However, not all of them do.
106 ;; If we added the linker flag to such packages, we would pollute all
107 ;; binaries, not only those used for testing.
108 (arguments
109 `(#:make-flags '("LDFLAGS=-ldl")))
34352662 110 (build-system gnu-build-system)
34a6f4dc 111 (home-page "https://wiki.freedesktop.org/www/Software/cppunit/")
34352662
JD
112 (synopsis "Unit testing framework for C++")
113 (description "CppUnit is the C++ port of the famous JUnit framework for
72b030c0 114unit testing. Test output is in XML for automatic testing and GUI based for
34352662
JD
115supervised tests.")
116 (license lgpl2.1))) ; no copyright notices. LGPL2.1 is in the tarball
3bfc99c7
EB
117
118(define-public catch-framework
119 (package
120 (name "catch")
a232ce42 121 (version "1.3.5") ;Sub-minor is the build number
3bfc99c7
EB
122 (source (origin
123 (method git-fetch)
124 (uri (git-reference
125 (url "https://github.com/philsquared/Catch")
14a17ef6 126 ;; Semi-arbitrary.
a232ce42 127 (commit "ae5ee2cf63d6d67bd1369b512d2a7b60b571c907")))
3bfc99c7
EB
128 (file-name (string-append name "-" version))
129 (sha256
130 (base32
a232ce42 131 "1yfb3lxv929szqy1nw9xw3d45wzkppziqshkjxvrb1fdmf46x564"))))
3bfc99c7
EB
132 (build-system trivial-build-system)
133 (arguments
134 `(#:modules ((guix build utils))
135 #:builder (begin
136 (use-modules (guix build utils))
137 (let* ((source (assoc-ref %build-inputs "source"))
138 (output (assoc-ref %outputs "out"))
139 (incdir (string-append output "/include"))
140 (docdir (string-append output "/share/doc/catch-"
141 ,version)))
142 (begin
143 (for-each mkdir-p (list incdir docdir))
96c46210 144 (install-file (string-append source
3bfc99c7 145 "/single_include/catch.hpp")
96c46210 146 incdir)
3bfc99c7
EB
147 (copy-recursively (string-append source "/docs")
148 docdir))))))
149 (home-page "http://catch-lib.net/")
150 (synopsis "Automated test framework for C++ and Objective-C")
151 (description
152 "Catch stands for C++ Automated Test Cases in Headers and is a
153multi-paradigm automated test framework for C++ and Objective-C.")
154 (license boost1.0)))
2259442b
EF
155
156(define-public cmocka
157 (package
158 (name "cmocka")
5be2931c 159 (version "1.1.0")
2259442b
EF
160 (source (origin
161 (method url-fetch)
5be2931c
EF
162 (uri (string-append "https://cmocka.org/files/"
163 (version-major+minor version) "/cmocka-"
2259442b
EF
164 version ".tar.xz"))
165 (sha256
166 (base32
5be2931c 167 "0c0k8ax16fgh39nsva09q4jsh83g9nxihkwj9d5666763fzx6q79"))))
2259442b
EF
168 (build-system cmake-build-system)
169 (arguments
170 `(#:tests? #f)) ; No test target
171 (home-page "https://cmocka.org/")
172 (synopsis "Unit testing framework for C")
173 (description "Cmocka is a unit testing framework for C with support for
174mock objects. It only requires the standard C library, and works with
175different compilers. Cmocka supports several different message output formats
176like Test Anything Protocol, Subunit, xUnit XML or the original cmockery output
177format.")
178 (license asl2.0)))
dd6e70f9
RJ
179
180(define-public cppcheck
181 (package
182 (name "cppcheck")
34ab3538 183 (version "1.77")
dd6e70f9
RJ
184 (source (origin
185 (method url-fetch)
186 (uri (string-append "https://github.com/danmar/cppcheck/archive/"
187 version ".tar.gz"))
188 (sha256
34ab3538 189 (base32 "1fn26p0xvfrdbhxjhy6aqhkk63n3fvrdb2ygcn9wg4vaandhmbkn"))
dd6e70f9
RJ
190 (file-name (string-append name "-" version ".tar.gz"))))
191 (build-system cmake-build-system)
192 (home-page "http://cppcheck.sourceforge.net")
193 (synopsis "Static C/C++ code analyzer")
194 (description "Cppcheck is a static code analyzer for C and C++. Unlike
195C/C++ compilers and many other analysis tools it does not detect syntax errors
196in the code. Cppcheck primarily detects the types of bugs that the compilers
197normally do not detect. The goal is to detect only real errors in the code
198(i.e. have zero false positives).")
199 (license gpl3+)))
5f6aba6b
LG
200
201(define-public googletest
202 (package
203 (name "googletest")
84e36a56 204 (version "1.8.0")
5f6aba6b
LG
205 (source
206 (origin
207 (method url-fetch)
208 (uri (string-append "https://github.com/google/googletest/archive/"
209 "release-" version ".tar.gz"))
210 (file-name (string-append name "-" version ".tar.gz"))
211 (sha256
212 (base32
84e36a56
BW
213 "1n5p1m2m3fjrjdj752lf92f9wq3pl5cbsfrb49jqbg52ghkz99jq"))))
214 (build-system cmake-build-system)
5f6aba6b 215 (native-inputs
84e36a56 216 `(("python-2" ,python-2)))
5f6aba6b
LG
217 (home-page "https://github.com/google/googletest/")
218 (synopsis "Test discovery and XUnit test framework")
219 (description "Google Test features an XUnit test framework, automated test
220discovery, death tests, assertions, parameterized tests and XML test report
221generation.")
222 (license bsd-3)))