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>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
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.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
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.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages check)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages autotools)
25 #:use-module (guix licenses)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix git-download)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system trivial))
39 (uri (string-append "mirror://sourceforge/check/check/"
40 version "/check-" version ".tar.gz"))
43 "02l4g79d81s07hzywcv1knwj5dyrwjiq2pgxaz7kidxi8m364wn2"))))
44 (build-system gnu-build-system)
45 (home-page "http://check.sourceforge.net/")
46 (synopsis "Unit test framework for C")
48 "Check is a unit testing framework for C. It features a simple
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
52 faults or other signals. The output from unit tests can be used within
53 source code editors and IDEs.")
63 (uri (string-append "mirror://sourceforge/cunit/CUnit/"
64 version "/CUnit-" version ".tar.bz2"))
67 "057j82da9vv4li4z5ri3227ybd18nzyq81f6gsvhifs5z0vr3cpm"))))
68 (build-system gnu-build-system)
73 (zero? (system* "autoreconf" "-vfi")))
76 `(("automake" ,automake)
77 ("autoconf" ,autoconf)
78 ("libtool" ,libtool)))
79 (home-page "http://cunit.sourceforge.net/")
80 (synopsis "Automated testing framework for C")
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.")
87 (define-public cppunit
93 (uri (string-append "mirror://sourceforge/cppunit/" name "/"
98 "0jm49v5rmc5qw34vqs56gy8xja1dhci73bmh23cig4kcir6a0a5c"))))
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.
104 `(#:make-flags '("LDFLAGS=-ldl")))
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
109 unit testing. Test output is in XML for automatic testing and GUI based for
111 (license lgpl2.1))) ; no copyright notices. LGPL2.1 is in the tarball
113 (define-public catch-framework
116 (version "1.1.3") ;Sub-minor is the build number
120 (url "https://github.com/philsquared/Catch")
122 (commit "c51e86819d")))
123 (file-name (string-append name "-" version))
126 "0kgi7wxxysgjbpisqfj4dj0k19cyyai92f001zi8gzkybd4fkgv5"))))
127 (build-system trivial-build-system)
129 `(#:modules ((guix build utils))
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-"
138 (for-each mkdir-p (list incdir docdir))
139 (install-file (string-append source
140 "/single_include/catch.hpp")
142 (copy-recursively (string-append source "/docs")
144 (home-page "http://catch-lib.net/")
145 (synopsis "Automated test framework for C++ and Objective-C")
147 "Catch stands for C++ Automated Test Cases in Headers and is a
148 multi-paradigm automated test framework for C++ and Objective-C.")