gnu: python-pandas: Fix build on 32-bit.
[jackhill/guix/guix.git] / gnu / packages / check.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
4 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
5 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
6 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
8 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
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 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
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
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages check)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages python)
29 #:use-module (guix utils)
30 #:use-module (guix licenses)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix git-download)
34 #:use-module (guix build-system cmake)
35 #:use-module (guix build-system gnu)
36 #:use-module (guix build-system trivial))
37
38 (define-public check
39 (package
40 (name "check")
41 (version "0.10.0")
42 (source
43 (origin
44 (method url-fetch)
45 (uri (string-append "https://github.com/libcheck/check/files/71408/"
46 "/check-" version ".tar.gz"))
47 (sha256
48 (base32
49 "0lhhywf5nxl3dd0hdakra3aasl590756c9kmvyifb3vgm9k0gxgm"))))
50 (build-system gnu-build-system)
51 (home-page "https://libcheck.github.io/check/")
52 (synopsis "Unit test framework for C")
53 (description
54 "Check is a unit testing framework for C. It features a simple
55 interface for defining unit tests, putting little in the way of the
56 developer. Tests are run in a separate address space, so Check can
57 catch both assertion failures and code errors that cause segmentation
58 faults or other signals. The output from unit tests can be used within
59 source code editors and IDEs.")
60 (license lgpl2.1+)))
61
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
89 unit tests in C. It provides C programmers with basic testing functionality
90 with a flexible variety of user interfaces.")
91 (license gpl2+)))
92
93 (define-public cppunit
94 (package
95 (name "cppunit")
96 (version "1.13.2")
97 (source (origin
98 (method url-fetch)
99 (uri (string-append "http://dev-www.libreoffice.org/src/"
100 name "-" version ".tar.gz"))
101 (sha256
102 (base32
103 "17s2kzmkw3kfjhpp72rfppyd7syr7bdq5s69syj2nvrlwd3d4irz"))))
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")))
110 (build-system gnu-build-system)
111 (home-page "https://wiki.freedesktop.org/www/Software/cppunit/")
112 (synopsis "Unit testing framework for C++")
113 (description "CppUnit is the C++ port of the famous JUnit framework for
114 unit testing. Test output is in XML for automatic testing and GUI based for
115 supervised tests.")
116 (license lgpl2.1))) ; no copyright notices. LGPL2.1 is in the tarball
117
118 (define-public catch-framework
119 (package
120 (name "catch")
121 (version "1.3.5") ;Sub-minor is the build number
122 (source (origin
123 (method git-fetch)
124 (uri (git-reference
125 (url "https://github.com/philsquared/Catch")
126 ;; Semi-arbitrary.
127 (commit "ae5ee2cf63d6d67bd1369b512d2a7b60b571c907")))
128 (file-name (string-append name "-" version))
129 (sha256
130 (base32
131 "1yfb3lxv929szqy1nw9xw3d45wzkppziqshkjxvrb1fdmf46x564"))))
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))
144 (install-file (string-append source
145 "/single_include/catch.hpp")
146 incdir)
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
153 multi-paradigm automated test framework for C++ and Objective-C.")
154 (license boost1.0)))
155
156 (define-public cmocka
157 (package
158 (name "cmocka")
159 (version "1.1.0")
160 (source (origin
161 (method url-fetch)
162 (uri (string-append "https://cmocka.org/files/"
163 (version-major+minor version) "/cmocka-"
164 version ".tar.xz"))
165 (sha256
166 (base32
167 "0c0k8ax16fgh39nsva09q4jsh83g9nxihkwj9d5666763fzx6q79"))))
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
174 mock objects. It only requires the standard C library, and works with
175 different compilers. Cmocka supports several different message output formats
176 like Test Anything Protocol, Subunit, xUnit XML or the original cmockery output
177 format.")
178 (license asl2.0)))
179
180 (define-public cppcheck
181 (package
182 (name "cppcheck")
183 (version "1.77")
184 (source (origin
185 (method url-fetch)
186 (uri (string-append "https://github.com/danmar/cppcheck/archive/"
187 version ".tar.gz"))
188 (sha256
189 (base32 "1fn26p0xvfrdbhxjhy6aqhkk63n3fvrdb2ygcn9wg4vaandhmbkn"))
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
195 C/C++ compilers and many other analysis tools it does not detect syntax errors
196 in the code. Cppcheck primarily detects the types of bugs that the compilers
197 normally do not detect. The goal is to detect only real errors in the code
198 (i.e. have zero false positives).")
199 (license gpl3+)))
200
201 (define-public googletest
202 (package
203 (name "googletest")
204 (version "1.8.0")
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
213 "1n5p1m2m3fjrjdj752lf92f9wq3pl5cbsfrb49jqbg52ghkz99jq"))))
214 (build-system cmake-build-system)
215 (native-inputs
216 `(("python-2" ,python-2)))
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
220 discovery, death tests, assertions, parameterized tests and XML test report
221 generation.")
222 (license bsd-3)))