Commit | Line | Data |
---|---|---|
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> |
d8989c23 | 6 | ;;; |
233e7676 | 7 | ;;; This file is part of GNU Guix. |
d8989c23 | 8 | ;;; |
233e7676 | 9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
d8989c23 NK |
10 | ;;; under the terms of the GNU General Public License as published by |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
233e7676 | 14 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
d8989c23 NK |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
d8989c23 | 21 | |
1ffa7090 | 22 | (define-module (gnu packages check) |
59a43334 | 23 | #:use-module (gnu packages) |
f767bcca | 24 | #:use-module (gnu packages autotools) |
d8989c23 NK |
25 | #:use-module (guix licenses) |
26 | #:use-module (guix packages) | |
27 | #:use-module (guix download) | |
3bfc99c7 EB |
28 | #:use-module (guix git-download) |
29 | #:use-module (guix build-system gnu) | |
30 | #:use-module (guix build-system trivial)) | |
d8989c23 NK |
31 | |
32 | (define-public check | |
33 | (package | |
34 | (name "check") | |
4ac696c6 | 35 | (version "0.9.14") |
d8989c23 NK |
36 | (source |
37 | (origin | |
38 | (method url-fetch) | |
9282e259 | 39 | (uri (string-append "mirror://sourceforge/check/check/" |
d8989c23 NK |
40 | version "/check-" version ".tar.gz")) |
41 | (sha256 | |
42 | (base32 | |
4ac696c6 | 43 | "02l4g79d81s07hzywcv1knwj5dyrwjiq2pgxaz7kidxi8m364wn2")))) |
d8989c23 NK |
44 | (build-system gnu-build-system) |
45 | (home-page "http://check.sourceforge.net/") | |
35b9e423 | 46 | (synopsis "Unit test framework for C") |
d8989c23 | 47 | (description |
35b9e423 | 48 | "Check is a unit testing framework for C. It features a simple |
d8989c23 NK |
49 | interface for defining unit tests, putting little in the way of the |
50 | developer. Tests are run in a separate address space, so Check can | |
51 | catch both assertion failures and code errors that cause segmentation | |
35b9e423 | 52 | faults or other signals. The output from unit tests can be used within |
d8989c23 NK |
53 | source code editors and IDEs.") |
54 | (license lgpl2.1+))) | |
34352662 | 55 | |
f767bcca RW |
56 | (define-public cunit |
57 | (package | |
58 | (name "cunit") | |
59 | (version "2.1-3") | |
60 | (source | |
61 | (origin | |
62 | (method url-fetch) | |
63 | (uri (string-append "mirror://sourceforge/cunit/CUnit/" | |
64 | version "/CUnit-" version ".tar.bz2")) | |
65 | (sha256 | |
66 | (base32 | |
67 | "057j82da9vv4li4z5ri3227ybd18nzyq81f6gsvhifs5z0vr3cpm")))) | |
68 | (build-system gnu-build-system) | |
69 | (arguments '(#:phases | |
70 | (alist-cons-before | |
71 | 'configure 'autoconf | |
72 | (lambda _ | |
73 | (zero? (system* "autoreconf" "-vfi"))) | |
74 | %standard-phases))) | |
75 | (native-inputs | |
76 | `(("automake" ,automake) | |
77 | ("autoconf" ,autoconf) | |
78 | ("libtool" ,libtool))) | |
79 | (home-page "http://cunit.sourceforge.net/") | |
80 | (synopsis "Automated testing framework for C") | |
81 | (description | |
82 | "CUnit is a lightweight system for writing, administering, and running | |
83 | unit tests in C. It provides C programmers with basic testing functionality | |
84 | with a flexible variety of user interfaces.") | |
85 | (license gpl2+))) | |
86 | ||
34352662 JD |
87 | (define-public cppunit |
88 | (package | |
89 | (name "cppunit") | |
90 | (version "1.12.1") | |
91 | (source (origin | |
92 | (method url-fetch) | |
28edab7a | 93 | (uri (string-append "mirror://sourceforge/cppunit/" name "/" |
34352662 JD |
94 | name "-" |
95 | version ".tar.gz")) | |
96 | (sha256 | |
97 | (base32 | |
98 | "0jm49v5rmc5qw34vqs56gy8xja1dhci73bmh23cig4kcir6a0a5c")))) | |
28edab7a AE |
99 | ;; Explicitly link with libdl. This is expected to be done by packages |
100 | ;; relying on cppunit for their tests. However, not all of them do. | |
101 | ;; If we added the linker flag to such packages, we would pollute all | |
102 | ;; binaries, not only those used for testing. | |
103 | (arguments | |
104 | `(#:make-flags '("LDFLAGS=-ldl"))) | |
34352662 JD |
105 | (build-system gnu-build-system) |
106 | (home-page "http://sourceforge.net/projects/cppunit/") | |
107 | (synopsis "Unit testing framework for C++") | |
108 | (description "CppUnit is the C++ port of the famous JUnit framework for | |
72b030c0 | 109 | unit testing. Test output is in XML for automatic testing and GUI based for |
34352662 JD |
110 | supervised tests.") |
111 | (license lgpl2.1))) ; no copyright notices. LGPL2.1 is in the tarball | |
3bfc99c7 EB |
112 | |
113 | (define-public catch-framework | |
114 | (package | |
115 | (name "catch") | |
14a17ef6 | 116 | (version "1.1.3") ;Sub-minor is the build number |
3bfc99c7 EB |
117 | (source (origin |
118 | (method git-fetch) | |
119 | (uri (git-reference | |
120 | (url "https://github.com/philsquared/Catch") | |
14a17ef6 RW |
121 | ;; Semi-arbitrary. |
122 | (commit "c51e86819d"))) | |
3bfc99c7 EB |
123 | (file-name (string-append name "-" version)) |
124 | (sha256 | |
125 | (base32 | |
14a17ef6 | 126 | "0kgi7wxxysgjbpisqfj4dj0k19cyyai92f001zi8gzkybd4fkgv5")))) |
3bfc99c7 EB |
127 | (build-system trivial-build-system) |
128 | (arguments | |
129 | `(#:modules ((guix build utils)) | |
130 | #:builder (begin | |
131 | (use-modules (guix build utils)) | |
132 | (let* ((source (assoc-ref %build-inputs "source")) | |
133 | (output (assoc-ref %outputs "out")) | |
134 | (incdir (string-append output "/include")) | |
135 | (docdir (string-append output "/share/doc/catch-" | |
136 | ,version))) | |
137 | (begin | |
138 | (for-each mkdir-p (list incdir docdir)) | |
96c46210 | 139 | (install-file (string-append source |
3bfc99c7 | 140 | "/single_include/catch.hpp") |
96c46210 | 141 | incdir) |
3bfc99c7 EB |
142 | (copy-recursively (string-append source "/docs") |
143 | docdir)))))) | |
144 | (home-page "http://catch-lib.net/") | |
145 | (synopsis "Automated test framework for C++ and Objective-C") | |
146 | (description | |
147 | "Catch stands for C++ Automated Test Cases in Headers and is a | |
148 | multi-paradigm automated test framework for C++ and Objective-C.") | |
149 | (license boost1.0))) |