-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcheck.scm
2679 lines (2532 loc) · 99.4 KB
/
check.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012 Nikita Karetnikov <[email protected]>
;;; Copyright © 2014 David Thompson <[email protected]>
;;; Copyright © 2015 Paul van der Walt <[email protected]>
;;; Copyright © 2014, 2015 Eric Bavier <[email protected]>
;;; Copyright © 2015 Mark H Weaver <[email protected]>
;;; Copyright © 2015, 2017 Cyril Roelandt <[email protected]>
;;; Copyright © 2015 Federico Beffa <[email protected]>
;;; Copyright © 2015 Andreas Enge <[email protected]>
;;; Copyright © 2015, 2016, 2018, 2019 Efraim Flashner <[email protected]>
;;; Copyright © 2016, 2017 Leo Famulari <[email protected]>
;;; Copyright © 2016 Christopher Allan Webber <[email protected]>
;;; Copyright © 2016, 2017 Danny Milosavljevic <[email protected]>
;;; Copyright © 2016 Roel Janssen <[email protected]>
;;; Copyright © 2016 Sou Bunnbu <[email protected]>
;;; Copyright © 2016 Troy Sankey <[email protected]>
;;; Copyright © 2016 Lukas Gradl <[email protected]>
;;; Copyright © 2016 Hartmut Goebel <[email protected]>
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <[email protected]>
;;; Copyright © 2017 Julien Lepiller <[email protected]>
;;; Copyright © 2017 Thomas Danckaert <[email protected]>
;;; Copyright © 2017, 2018 Arun Isaac <[email protected]>
;;; Copyright © 2017 Frederick M. Muriithi <[email protected]>
;;; Copyright © 2017, 2019 Mathieu Othacehe <[email protected]>
;;; Copyright © 2017, 2019 Kei Kebreau <[email protected]>
;;; Copyright © 2017 Nikita <[email protected]>
;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <[email protected]>
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <[email protected]>
;;; Copyright © 2017, 2018, 2020 Ludovic Courtès <[email protected]>
;;; Copyright © 2018 Fis Trivial <[email protected]>
;;; Copyright © 2019 Pierre Langlois <[email protected]>
;;; Copyright © 2019 Chris Marusich <[email protected]>
;;; Copyright © 2020 Lars-Dominik Braun <[email protected]>
;;; Copyright © 2020 Brice Waegeneire <[email protected]>
;;; Copyright © 2020 Josh Marshall <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages check)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages golang)
#:use-module (gnu packages gtk)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages time)
#:use-module (gnu packages xml)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial))
(define-public check
(package
(name "check")
(version "0.14.0")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/libcheck/check/releases/download/"
version "/check-" version ".tar.gz"))
(sha256
(base32
"02zkfiyklckmivrfvdsrlzvzphkdsgjrz3igncw05dv5pshhq3xx"))))
(build-system gnu-build-system)
(home-page "https://libcheck.github.io/check/")
(synopsis "Unit test framework for C")
(description
"Check is a unit testing framework for C. It features a simple
interface for defining unit tests, putting little in the way of the
developer. Tests are run in a separate address space, so Check can
catch both assertion failures and code errors that cause segmentation
faults or other signals. The output from unit tests can be used within
source code editors and IDEs.")
(license license:lgpl2.1+)))
;; Some packages require this older version. Removed once no longer needed.
(define-public check-0.12
(package/inherit
check
(version "0.12.0")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/libcheck/check/releases"
"/download/" version "/check-" version ".tar.gz"))
(sha256
(base32
"0d22h8xshmbpl9hba9ch3xj8vb9ybm5akpsbbh7yj07fic4h2hj6"))))))
(define-public cunit
(package
(name "cunit")
(version "2.1-3")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/cunit/CUnit/"
version "/CUnit-" version ".tar.bz2"))
(sha256
(base32
"057j82da9vv4li4z5ri3227ybd18nzyq81f6gsvhifs5z0vr3cpm"))))
(build-system gnu-build-system)
(arguments '(#:phases
(modify-phases %standard-phases
;; XXX: The "bootstrap" phase detects the "bootstrap"
;; script, but fails to execute it, so we bootstrap
;; manually.
(replace 'bootstrap
(lambda _ (invoke "autoreconf" "-vfi"))))))
(native-inputs
`(("automake" ,automake)
("autoconf" ,autoconf)
("libtool" ,libtool)))
(home-page "http://cunit.sourceforge.net/")
(synopsis "Automated testing framework for C")
(description
"CUnit is a lightweight system for writing, administering, and running
unit tests in C. It provides C programmers with basic testing functionality
with a flexible variety of user interfaces.")
(license license:gpl2+)))
(define-public cppunit
(package
(name "cppunit")
(version "1.14.0")
(source (origin
(method url-fetch)
(uri (string-append "http://dev-www.libreoffice.org/src/"
name "-" version ".tar.gz"))
(sha256
(base32
"1027cyfx5gsjkdkaf6c2wnjh68882grw8n672018cj3vs9lrhmix"))))
;; Explicitly link with libdl. This is expected to be done by packages
;; relying on cppunit for their tests. However, not all of them do.
;; If we added the linker flag to such packages, we would pollute all
;; binaries, not only those used for testing.
(arguments
`(#:make-flags '("LDFLAGS=-ldl")))
(build-system gnu-build-system)
(home-page "https://wiki.freedesktop.org/www/Software/cppunit/")
(synopsis "Unit testing framework for C++")
(description "CppUnit is the C++ port of the famous JUnit framework for
unit testing. Test output is in XML for automatic testing and GUI based for
supervised tests.")
(license license:lgpl2.1))) ; no copyright notices. LGPL2.1 is in the tarball
;; When dependent packages upgraded to use newer version of catch, this one should
;; be removed.
(define-public catch-framework
(package
(name "catch")
(version "1.3.5") ;Sub-minor is the build number
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/philsquared/Catch")
;; Semi-arbitrary.
(commit "ae5ee2cf63d6d67bd1369b512d2a7b60b571c907")))
(file-name (string-append name "-" version))
(sha256
(base32
"1yfb3lxv929szqy1nw9xw3d45wzkppziqshkjxvrb1fdmf46x564"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
#:builder (begin
(use-modules (guix build utils))
(let* ((source (assoc-ref %build-inputs "source"))
(output (assoc-ref %outputs "out"))
(incdir (string-append output "/include"))
(docdir (string-append output "/share/doc/catch-"
,version)))
(for-each mkdir-p (list incdir docdir))
(install-file (string-append source
"/single_include/catch.hpp")
incdir)
(copy-recursively (string-append source "/docs")
docdir)
#t))))
(home-page "http://catch-lib.net/")
(synopsis "Automated test framework for C++ and Objective-C")
(description
"Catch stands for C++ Automated Test Cases in Headers and is a
multi-paradigm automated test framework for C++ and Objective-C.")
(license license:boost1.0)))
(define-public catch-framework2-1
(package
(name "catch2")
(version "1.12.2")
(home-page "https://github.com/catchorg/Catch2")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/catchorg/Catch2")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1gdp5wm8khn02g2miz381llw3191k7309qj8s3jd6sasj01rhf23"))))
(build-system cmake-build-system)
(synopsis "Automated test framework for C++ and Objective-C")
(description "Catch2 stands for C++ Automated Test Cases in Headers and is
a multi-paradigm automated test framework for C++ and Objective-C.")
(license license:boost1.0)))
(define-public catch-framework2
(package
(name "catch2")
(version "2.1.2")
(home-page "https://github.com/catchorg/Catch2")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/catchorg/Catch2")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"14vcckqmbydjsg40ngi6iv999zimysh2l7fmrqj1d7xl990qz233"))))
(build-system cmake-build-system)
(inputs
`(("python" ,python-wrapper)))
(synopsis "Automated test framework for C++ and Objective-C")
(description "Catch2 stands for C++ Automated Test Cases in Headers and is
a multi-paradigm automated test framework for C++ and Objective-C.")
(license license:boost1.0)))
(define-public cmdtest
(package
(name "cmdtest")
(version "0.32")
(source (origin
(method url-fetch)
(uri (string-append "http://git.liw.fi/cmdtest/snapshot/"
name "-" version ".tar.gz"))
(sha256
(base32
"1jmfiyrrqmpvwdb273bkb8hjaf4rwx9njblx29pmr7giyahskwi5"))))
(build-system python-build-system)
(arguments
`(#:python ,python-2
#:phases
(modify-phases %standard-phases
;; check phase needs to be run before the build phase. If not, the
;; coverage test runner looks for tests for the built source files,
;; and fails.
(delete 'check)
(add-before 'build 'check
(lambda _
(substitute* "yarn"
(("/bin/sh") (which "sh")))
;; yarn uses python2-ttystatus to print messages.
;; python2-ttystatus requires /dev/tty which is not present in
;; the build environment. Hence assuming-failure test fails.
(delete-file "yarn.tests/assuming-failure.script")
(delete-file "yarn.tests/assuming-failure.stdout")
(invoke "python" "setup.py" "check"))))))
(native-inputs
`(("python2-coverage-test-runner" ,python2-coverage-test-runner)))
(propagated-inputs
`(("python2-cliapp" ,python2-cliapp)
("python2-markdown" ,python2-markdown)
("python2-ttystatus" ,python2-ttystatus)))
(home-page "https://liw.fi/cmdtest/")
(synopsis "Black box Unix program tester")
(description
"@code{cmdtest} black box tests Unix command line tools. Roughly, it is
given a command line and input files, and the expected output, and it verifies
that the command line produces the expected output. If not, it reports a
problem, and shows the differences.")
(license license:gpl3+)))
(define-public cmocka
(package
(name "cmocka")
(version "1.1.5")
(source (origin
(method url-fetch)
(uri (string-append "https://cmocka.org/files/"
(version-major+minor version) "/cmocka-"
version ".tar.xz"))
(sha256
(base32
"1dm8pdvkyfa8dsbz9bpq7wwgixjij4sii9bbn5sgvqjm5ljdik7h"))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f)) ; no test target
(home-page "https://cmocka.org/")
(synopsis "Unit testing framework for C")
(description "Cmocka is a unit testing framework for C with support for
mock objects. It only requires the standard C library, and works with
different compilers. Cmocka supports several different message output formats
like Test Anything Protocol, Subunit, xUnit XML or the original cmockery output
format.")
(license license:asl2.0)))
(define-public cppcheck
(package
(name "cppcheck")
(version "1.90")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/danmar/cppcheck")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32 "0h7ir2x0k005fm586dxmaphgv5cyz25k3k4sh02p7zb78gzx398h"))))
(build-system cmake-build-system)
(arguments
'(#:configure-flags '("-DBUILD_TESTS=ON")))
(home-page "http://cppcheck.sourceforge.net")
(synopsis "Static C/C++ code analyzer")
(description "Cppcheck is a static code analyzer for C and C++. Unlike
C/C++ compilers and many other analysis tools it does not detect syntax errors
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 license:gpl3+)))
(define-public cxxtest
(package
(name "cxxtest")
(version "4.4")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/cxxtest/cxxtest/"
version "/cxxtest-" version ".tar.gz"))
(sha256
(base32
"1n7pbj4z9ivx005hqvivj9ddhq8awynzg6jishfbypf6j7ply58w"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'chdir-to-source
(lambda _
(chdir "python")
#t))
(add-after 'install 'install-headers
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(include-dir (string-append out "/include/cxxtest")))
(for-each (lambda (header-file)
(install-file header-file include-dir))
(find-files "../cxxtest"))
#t)))
(add-after 'install 'install-doc
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(doc-dir (string-append out "/share/doc/cxxtest")))
(install-file "../README" doc-dir)
(install-file "../doc/guide.txt" doc-dir)
(copy-recursively "../sample" (string-append doc-dir "/sample"))
#t))))))
(propagated-inputs
`(("python-ply" ,python-ply)))
(home-page "https://cxxtest.com/")
(synopsis "Unit testing framework for C++")
(description "CxxTest is a unit testing framework for C++ that is similar
in spirit to JUnit, CppUnit, and xUnit. CxxTest does not require precompiling
a CxxTest testing library, it employs no advanced features of C++ (e.g. RTTI)
and it supports a very flexible form of test discovery.")
(license license:lgpl3+)))
(define-public doctest
(package
(name "doctest")
(version "2.3.7")
(home-page "https://github.com/onqtam/doctest")
(source (origin
(method git-fetch)
(uri (git-reference (url home-page) (commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"134lx7pjnglrl4wdmyr9dz3rjb6d4ir6rvapg00gp52n44dbhnrq"))))
(build-system cmake-build-system)
(synopsis "C++ test framework")
(description
"doctest is a single-header testing framework for C++11 and later. It
has been designed to be fast, light and unintrusive.")
(license license:expat)))
(define-public go-gopkg.in-check.v1
(let ((commit "788fd78401277ebd861206a03c884797c6ec5541")
(revision "1"))
(package
(name "go-gopkg.in-check.v1")
(version (git-version "0.0.0" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/go-check/check.git")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"0v3bim0j375z81zrpr5qv42knqs0y2qv2vkjiqi5axvb78slki1a"))))
(build-system go-build-system)
(arguments
'(#:import-path "gopkg.in/check.v1"))
(propagated-inputs
`(("go-github-com-kr-pretty" ,go-github-com-kr-pretty)))
(synopsis "Rich testing extension for Go's testing package")
(description
"@code{check} is a rich testing extension for Go's testing package.")
(home-page "https://github.com/go-check/check")
(license license:bsd-2))))
(define-public go-github.com-smartystreets-gunit
(package
(name "go-github.com-smartystreets-gunit")
(version "1.0.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/smartystreets/gunit")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"00m4zg0kdj49mnpmf9klb44ba71p966xsk6zknrzqgfc8119f35z"))))
(build-system go-build-system)
(arguments
'(;; TODO: This package depends on go-github.com-smartystreets-assertions
;; for running the tests, but go-github.com-smartystreets-assertions
;; depends on this package, so break this loop by not running the tests
;; for this package.
#:tests? #f
#:import-path "github.com/smartystreets/gunit"))
(synopsis "Testing tool for Go, in the style of xUnit")
(description
"@code{gunit} allows the test author to use a struct as the scope for a
group of related test cases, in the style of xUnit fixtures. This makes
extraction of setup/teardown behavior (as well as invoking the system under
test) much simpler.")
(home-page "https://github.com/smartystreets/gunit")
(license license:expat)))
(define-public go-github.com-smartystreets-assertions
(package
(name "go-github.com-smartystreets-assertions")
(version "1.8.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/smartystreets/assertions")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"1j0adgbykl55rf2945g0n5bmqdsnjcqlx5dcmpfh4chki43hiwg9"))))
(build-system go-build-system)
(arguments
'(#:import-path "github.com/smartystreets/assertions"))
(native-inputs
`(("go-github.com-smartystreets-gunit" ,go-github.com-smartystreets-gunit)))
(synopsis "Assertions for testing with Go")
(description
"The @code{assertions} package provides convenient assertion functions
for writing tests in Go.")
(home-page "https://github.com/smartystreets/assertions")
(license license:expat)))
(define-public go-github.com-smartystreets-goconvey
(package
(name "go-github.com-smartystreets-goconvey")
(version "1.6.3")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/smartystreets/goconvey")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"1ph18rkl3ns3fgin5i4j54w5a69grrmf3apcsmnpdn1wlrbs3dxh"))))
(build-system go-build-system)
(arguments
'(#:import-path "github.com/smartystreets/goconvey"))
(propagated-inputs
`(("go-github.com-jtolds-gls" ,go-github.com-jtolds-gls)
("go-github.com-smartystreets-assertions" ,go-github.com-smartystreets-assertions)))
(synopsis "Go testing tool with both a web and terminal user interface")
(description
"GoConvey is a testing tool for Go. It integrates with go test, can show
test coverage and has a web user interface that will refresh automatically.")
(home-page "https://github.com/smartystreets/goconvey")
(license license:expat)))
(define-public googletest
(package
(name "googletest")
(version "1.10.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/google/googletest.git")
(commit (string-append "release-" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1zbmab9295scgg4z2vclgfgjchfjailjnvzc6f5x9jvlsdi3dpwz"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
(native-inputs
`(("python" ,python-wrapper)))
(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 license:bsd-3)))
(define-public googletest-1.8
(package/inherit
googletest
(version "1.8.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/google/googletest.git")
(commit (string-append "release-" version))))
(file-name (git-file-name "googletest" version))
(sha256
(base32
"0270msj6n7mggh4xqqjp54kswbl7mkcc8px1p5dqdpmw5ngh9fzk"))))))
(define-public cpputest
(package
(name "cpputest")
(version "3.8")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/cpputest/cpputest/releases/download/v"
version "/cpputest-" version ".tar.gz"))
(sha256
(base32
"0mk48xd3klyqi7wf3f4wn4zqxxzmvrhhl32r25jzrixzl72wq7f8"))))
(build-system gnu-build-system)
(native-inputs
`(("googletest" ,googletest)))
(home-page "https://cpputest.github.io/")
(synopsis "Unit testing and mocking framework for C/C++")
(description
"CppUTest is a C/C++ based unit xUnit test framework. It is written in
C++ but is used in C and C++ projects and frequently used in embedded systems
but it works for any C/C++ project.")
(license license:bsd-3)))
(define-public python-parameterized
(package
(name "python-parameterized")
(version "0.7.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "parameterized" version))
(sha256
(base32
"0g1q6n7fkanjv7i1djzw62f46xf573jvza7afabh3baqjqxy7rpd"))))
(build-system python-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
(invoke "nosetests" "-v")
(format #t "test suite not run~%"))
#t)))))
(native-inputs
`(("python-mock" ,python-mock)
("python-nose" ,python-nose)))
(home-page "https://github.com/wolever/parameterized")
(synopsis "Parameterized testing with any Python test framework")
(description
"Parameterized is a Python library that aims to fix parameterized testing
for every Python test framework. It supports nose, py.test, and unittest.")
(properties `((python2-variant . ,(delay python2-parameterized))))
(license license:bsd-2)))
(define-public python2-parameterized
(let ((base (package-with-python2 (strip-python2-variant
python-parameterized))))
(package/inherit
base
(source
(origin
(inherit (package-source base))
(patches (search-patches "python2-parameterized-docstring-test.patch")))))))
(define-public python-minimock
(package
(name "python-minimock")
(version "1.2.8")
(source
(origin
(method url-fetch)
(uri (pypi-uri "MiniMock" version))
(sha256
(base32
"0k2sxb1ibnyg05iblz7zhbv825f1zk9906rab7883iqgvzmdzpsz"))))
(build-system python-build-system)
(home-page "https://pypi.org/project/MiniMock")
(synopsis "Simple Python library for using mock objects")
(description "MiniMock is a simple library for building mock objects with
doctest.")
(license license:expat)))
(define-public python2-minimock
(package-with-python2 python-minimock))
(define-public python-mock
(package
(name "python-mock")
(version "3.0.5")
(source
(origin
(method url-fetch)
(uri (pypi-uri "mock" version))
(sha256
(base32
"1hrp6j0yrx2xzylfv02qa8kph661m6yq4p0mc8fnimch9j4psrc3"))))
(propagated-inputs
`(("python-six" ,python-six)))
(build-system python-build-system)
(arguments
;; FIXME: Tests require "pytest", which depends on this package.
'(#:tests? #f))
(home-page "https://github.com/testing-cabal/mock")
(synopsis "Python mocking and patching library for testing")
(description
"Mock is a library for testing in Python. It allows you to replace parts
of your system under test with mock objects and make assertions about how they
have been used.")
(properties `((python2-variant . ,(delay python2-mock))))
(license license:expat)))
(define-public python2-mock
(let ((base (package-with-python2
(strip-python2-variant python-mock))))
(package (inherit base)
(propagated-inputs
`(("python2-functools32" ,python2-functools32)
("python2-funcsigs" ,python2-funcsigs)
,@(package-propagated-inputs base))))))
(define-public python-nose
(package
(name "python-nose")
(version "1.3.7")
(source
(origin
(method url-fetch)
(uri (pypi-uri "nose" version))
(sha256
(base32
"164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
(build-system python-build-system)
(arguments
'(#:tests? #f)) ; FIXME: test suite fails
(home-page "http://readthedocs.org/docs/nose/")
(synopsis "Python testing library")
(description
"Nose extends the unittest library to make testing easier.")
(license license:lgpl2.0+)))
(define-public python2-nose
(package-with-python2 python-nose))
(define-public python-nose2
(package
(name "python-nose2")
(version "0.9.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "nose2" version))
(sha256
(base32
"0pmbb6nk31yhgh4zkcblzxsznml7f7pf5q1ihgrwvbxv4mwzfql7"))))
(build-system python-build-system)
(arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
(propagated-inputs
`(("python-cov-core" ,python-cov-core)
("python-pytest-cov" ,python-pytest-cov)
("python-six" ,python-six)))
(home-page "https://github.com/nose-devs/nose2")
(synopsis "Next generation of nicer testing for Python")
(description
"Nose2 is the next generation of nicer testing for Python, based on the
plugins branch of unittest2. Nose2 aims to improve on nose by providing a
better plugin api, being easier for users to configure, and simplifying internal
interfaces and processes.")
(license license:bsd-2)))
(define-public python2-nose2
(package-with-python2 python-nose2))
(define-public python-unittest2
(package
(name "python-unittest2")
(version "1.1.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "unittest2" version))
(patches
(search-patches "python-unittest2-python3-compat.patch"
"python-unittest2-remove-argparse.patch"))
(sha256
(base32
"0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
(zero? (system* "python" "-m" "unittest2" "discover" "--verbose")))))))
(propagated-inputs
`(("python-six" ,python-six)
("python-traceback2" ,python-traceback2)))
(home-page "https://pypi.org/project/unittest2/")
(synopsis "Python unit testing library")
(description
"Unittest2 is a replacement for the unittest module in the Python
standard library.")
(license license:psfl)))
(define-public python2-unittest2
(package-with-python2 python-unittest2))
(define-public python-pytest
(package
(name "python-pytest")
(version "5.4.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest" version))
(sha256
(base32
"1656cwyqfc3scmxkmrrfzngsql46vn1xmdjmwhbr60baby9mwazb"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda* (#:key (tests? #t) #:allow-other-keys)
(if tests?
(invoke "pytest" "-vv" "-k"
(string-append
;; These tests involve the /usr directory, and fails.
"not test_remove_dir_prefix"
" and not test_argcomplete"
;; This test tries to override PYTHONPATH, and
;; subsequently fails to locate the test libraries.
" and not test_collection"))
(format #t "test suite not run~%"))
#t)))))
(propagated-inputs
`(("python-atomicwrites" ,python-atomicwrites)
("python-attrs" ,python-attrs-bootstrap)
("python-colorama" ,python-colorama)
("python-importlib-metadata" ,python-importlib-metadata)
("python-more-itertools" ,python-more-itertools)
("python-packaging" ,python-packaging-bootstrap)
("python-pluggy" ,python-pluggy)
("python-py" ,python-py)
("python-six" ,python-six-bootstrap)
("python-wcwidth" ,python-wcwidth)))
(native-inputs
`(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
("bash" ,bash)
("python-hypothesis" ,python-hypothesis)
("python-nose" ,python-nose)
("python-mock" ,python-mock)
("python-pytest" ,python-pytest-bootstrap)
("python-setuptools-scm" ,python-setuptools-scm)
("python-xmlschema" ,python-xmlschema)))
(home-page "https://docs.pytest.org/en/latest/")
(synopsis "Python testing library")
(description
"Pytest is a testing tool that provides auto-discovery of test modules
and functions, detailed info on failing assert statements, modular fixtures,
and many external plugins.")
(license license:expat)
(properties `((python2-variant . ,(delay python2-pytest))))))
;; Pytest 4.x are the last versions that support Python 2.
(define-public python2-pytest
(package
(inherit (strip-python2-variant python-pytest))
(name "python2-pytest")
(version "4.6.9")
(source (origin
(method url-fetch)
(uri (pypi-uri "pytest" version))
(sha256
(base32
"0fgkmpc31nzy97fxfrkqbzycigdwxwwmninx3qhkzp81migggs0r"))))
(build-system python-build-system)
(arguments
`(#:python ,python-2
,@(package-arguments python-pytest)))
(propagated-inputs
`(("python-atomicwrites" ,python2-atomicwrites)
("python-attrs" ,python2-attrs-bootstrap)
("python-funcsigs" ,python2-funcsigs)
("python-importlib-metadata" ,python2-importlib-metadata-bootstrap)
("python-more-itertools" ,python2-more-itertools)
("python-packaging" ,python2-packaging-bootstrap)
("python-pathlib2" ,python2-pathlib2)
("python-pluggy" ,python2-pluggy)
("python-py" ,python2-py)
("python-six" ,python2-six-bootstrap)
("python-wcwidth" ,python2-wcwidth)))
(native-inputs
`(("bash" ,bash) ;tests require 'compgen'
("python-hypothesis" ,python2-hypothesis)
("python-nose" ,python2-nose)
("python-mock" ,python2-mock)
("python-pytest" ,python2-pytest-bootstrap)
("python-setuptools-scm" ,python2-setuptools-scm)))))
(define-public python-pytest-bootstrap
(package
(inherit (strip-python2-variant python-pytest))
(name "python-pytest-bootstrap")
(native-inputs `(("python-setuptools-scm" ,python-setuptools-scm)))
(arguments `(#:tests? #f))
(properties `((python2-variant . ,(delay python2-pytest-bootstrap))))))
(define-public python2-pytest-bootstrap
(hidden-package
(package/inherit
python2-pytest
(name "python2-pytest-bootstrap")
(arguments
(substitute-keyword-arguments (package-arguments python2-pytest)
((#:tests? _ #f) #f)))
(native-inputs
`(("python-setuptools-scm" ,python2-setuptools-scm)))
(propagated-inputs
`(("python-atomicwrites" ,python2-atomicwrites)
("python-attrs" ,python2-attrs-bootstrap)
("python-funcsigs" ,python2-funcsigs-bootstrap)
("python-importlib-metadata" ,python2-importlib-metadata-bootstrap)
("python-more-itertools" ,python2-more-itertools)
("python-packaging" ,python2-packaging-bootstrap)
("python-pathlib2" ,python2-pathlib2-bootstrap)
("python-pluggy" ,python2-pluggy-bootstrap)
("python-py" ,python2-py)
("python-wcwidth" ,python2-wcwidth))))))
(define-public python-pytest-cov
(package
(name "python-pytest-cov")
(version "2.8.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-cov" version))
(sha256
(base32 "0avzlk9p4nc44k7lpx9109dybq71xqnggxb9f4hp0l64pbc44ryc"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
;; Options taken from tox.ini.
;; TODO: make "--restructuredtext" tests pass. They currently fail
;; with "Duplicate implicit target name".
(invoke "python" "./setup.py" "check"
"--strict" "--metadata"))))))
(propagated-inputs
`(("python-coverage" ,python-coverage)
("python-pytest" ,python-pytest)))
(home-page "https://github.com/pytest-dev/pytest-cov")
(synopsis "Pytest plugin for measuring coverage")
(description
"Pytest-cov produces coverage reports. It supports centralised testing and
distributed testing in both @code{load} and @code{each} modes. It also
supports coverage of subprocesses.")
(license license:expat)))
(define-public python2-pytest-cov
(package-with-python2 python-pytest-cov))
(define-public python-pytest-runner
(package
(name "python-pytest-runner")
(version "5.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-runner" version))
(sha256
(base32
"0awll1bva5zy8cspsxcpv7pjcrdf5c6pf56nqn4f74vvmlzfgiwn"))))
(build-system python-build-system)
(arguments
'(;; FIXME: The test suite requires 'python-flake8' and 'python-black',
;; but that introduces a circular dependency.
#:tests? #f
#:phases (modify-phases %standard-phases
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
(invoke "pytest" "-vv")
(format #t "test suite not run~%"))
#t)))))
(native-inputs
`(("python-setuptools-scm" ,python-setuptools-scm)))
(home-page "https://github.com/pytest-dev/pytest-runner")
(synopsis "Invoke py.test as a distutils command")
(description
"This package provides a @command{pytest-runner} command that
@file{setup.py} files can use to run tests.")
(license license:expat)))
(define-public python2-pytest-runner
(package-with-python2 python-pytest-runner))
;; python-bleach 3.1.0 requires this ancient version of pytest-runner.
;; Remove once no longer needed.
(define-public python-pytest-runner-2
(package/inherit
python-pytest-runner
(version "2.12.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "pytest-runner" version))
(sha256
(base32
"11ivjj9hfphkv4yfb2g74av4yy86y8gcbf7gbif0p1hcdfnxg3w6"))))))
(define-public python2-pytest-runner-2
(package-with-python2 python-pytest-runner-2))
(define-public python-pytest-mock
(package
(name "python-pytest-mock")
(version "1.10.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-mock" version))
(sha256
(base32
"1i5mg3ff1qk0wqfcxfz60hwy3q5dskdp36i10ckigkzffg8hc3ad"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools-scm" ,python-setuptools-scm)))
(propagated-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://github.com/pytest-dev/pytest-mock/")
(synopsis "Thin-wrapper around the mock package for easier use with py.test")
(description
"This plugin installs a @code{mocker} fixture which is a thin-wrapper
around the patching API provided by the @code{mock} package, but with the
benefit of not having to worry about undoing patches at the end of a test.
The mocker fixture has the same API as @code{mock.patch}, supporting the
same arguments.")
(properties `((python2-variant . ,(delay python2-pytest-mock))))