summaryrefslogtreecommitdiff
path: root/gnu/packages/check.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r--gnu/packages/check.scm343
1 files changed, 65 insertions, 278 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 47428c451c..3e04fce75d 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -56,6 +56,7 @@
;;; Copyright © 2024 Ashvith Shetty <ashvithshetty10@gmail.com>
;;; Copyright © 2025 Jordan Moore <lockbox@struct.foo>
;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2025 nomike Postmann <nomike@nomike.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -425,49 +426,6 @@ Makefiles. It allows for a set of configurable rules being run
against a @file{Makefile} or a set of @file{*.mk} files.")
(license license:expat)))
-;;; XXX: This project is abandoned upstream, and included in modern catch2
-;;; releases. It is still depended by the restinio test suite at this time,
-;;; so keep it (see: https://github.com/Stiffstream/restinio/issues/181).
-(define-public clara
- (package
- (name "clara")
- (version "1.1.5")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/catchorg/Clara")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "08mlm9ax5d7wkmsihm1xnlgp7rfgff0bfl4ly4850xmrdaxmmkl3"))
- (modules '((guix build utils)))
- (snippet '(begin
- ;; Un-bundle catch2.
- (delete-file-recursively "third_party")
- (substitute* "CMakeLists.txt"
- (("include_directories\\( include third_party )")
- "include_directories( include )"))))))
- (build-system cmake-build-system)
- (arguments
- (list
- #:configure-flags
- #~(list (string-append "-DCMAKE_CXX_FLAGS=-I"
- (search-input-directory %build-inputs
- "include/catch2")))
- #:phases
- #~(modify-phases %standard-phases
- (replace 'install
- (lambda _
- (install-file (string-append #$source "/single_include/clara.hpp")
- (string-append #$output "/include")))))))
- (native-inputs (list catch2))
- (home-page "https://github.com/catchorg/Clara")
- (synopsis "Simple command line parser for C++")
- (description "Clara is a simple to use, composable, command line parser
-for C++ 11 and beyond implemented as a single-header library.")
- (license license:boost1.0)))
-
(define-public clitest
(package
(name "clitest")
@@ -615,6 +573,34 @@ similar to @code{log4j}. It is designed to work in a similar manner to JUnit,
PyUnit and others.")
(license license:asl2.0)))
+(define-public snitch
+ (package
+ (name "snitch")
+ (version "1.3.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/snitch-org/snitch")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0mf55yi8ahpczl9jz2is3dnghfi3g9qz5vch7mx7akqx4gfhhviz"))))
+ (build-system cmake-build-system)
+ (arguments (list #:tests? #f
+ #:configure-flags
+ #~(list "-DBUILD_SHARED_LIBS=ON"
+ "-DSNITCH_DO_TEST=ON"
+ "-DSNITCH_USE_SYSTEM_DOCTEST=ON")))
+ (native-inputs (list doctest))
+ (home-page "https://github.com/snitch-org/snitch")
+ (synopsis "Lightweight C++20 testing framework")
+ (description "@code{snitch} aims to be a simple, cheap, non-invasive, and
+user-friendly testing framework. The design philosophy is to keep the testing
+API lean, including only what is strictly necessary to present clear messages
+when a test fails.")
+ (license license:boost1.0)))
+
;; When dependent packages upgraded to use newer version of catch, this one should
;; be removed.
(define-public catch-framework
@@ -768,20 +754,19 @@ It allows the specification of behaviour scenarios using a given-when-then
pattern.")
(license license:apsl2))))
-(define-public catch2-3
+(define-public catch2-3.8
(package
(name "catch2")
- (version "3.5.3")
- (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
- "11yla93vm2896fzhm3fz8lk3y3iz5iy7vd6wa7wnwvhsfd2dbfq3"))))
+ (version "3.8.1")
+ (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 "0v1k14n02aiw4rv5sxhc5612cjhkdj59cjpm50qfxhapsdv54n3f"))))
(build-system cmake-build-system)
(arguments
(list
@@ -790,11 +775,28 @@ pattern.")
"-DCATCH_ENABLE_WERROR=OFF"
"-DBUILD_SHARED_LIBS=ON")))
(inputs (list python-wrapper))
+ (home-page "https://github.com/catchorg/Catch2")
(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 catch2-3
+ (package
+ (inherit catch2-3.8)
+ (name "catch2")
+ (version "3.5.3")
+ (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
+ "11yla93vm2896fzhm3fz8lk3y3iz5iy7vd6wa7wnwvhsfd2dbfq3"))))))
+
(define-public cmdtest
(package
(name "cmdtest")
@@ -1144,7 +1146,8 @@ package.")
(base32 "1cv55x3amwrvfan9pr8dfnicwr8r6ar3yf6cg9v6nykd6m2v3qsv"))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
+ `(#:tests? #f
+ #:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
(native-inputs
`(("python" ,python-wrapper)))
(home-page "https://github.com/google/googletest/")
@@ -1357,7 +1360,9 @@ with the @code{klee} package.")
(arguments
(list
#:strip-directories #~(list "bin") ;don't strip LLVM bitcode in /lib
- #:test-target "check"
+ #:modules '((guix build cmake-build-system)
+ ((guix build gnu-build-system) #:prefix gnu:)
+ (guix build utils))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch
@@ -1373,6 +1378,7 @@ with the @code{klee} package.")
(substitute* "test/lit.cfg"
(("addEnv\\('PWD'\\)" env)
(string-append env "\n" "addEnv('GUIX_PYTHONPATH')")))))
+ (replace 'check (assoc-ref gnu:%standard-phases 'check))
(add-after 'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -1731,38 +1737,6 @@ and many external plugins.")
python-wheel))
(arguments `(#:tests? #f))))
-(define-public python-pytest-assume
- (package
- (name "python-pytest-assume")
- (version "2.4.3")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "pytest-assume" version))
- (sha256
- (base32 "0zilqsy9fcjr6l2f9qzfxpkp40h24csnjm5mifhpmzb0fr9r0glq"))))
- (build-system python-build-system)
- (arguments
- `(#:phases (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest")))))))
- (propagated-inputs
- (list python-pytest python-six))
- (home-page "https://github.com/astraw38/pytest-assume")
- (synopsis "Pytest plugin that allows multiple failures per test")
-
- (description "This package provides a Pytest plugin that allows multiple
-failures per test. This is a fork from pytest-expect which includes the
-following improvements:
-@itemize
-@item showlocals support (the Pytest option)
-@item global usage support (a fixture is not required)
-@item output refinements and tweaks.
-@end itemize")
- (license license:expat)))
-
(define-public python-pytest-cov
(package
(name "python-pytest-cov")
@@ -2672,28 +2646,6 @@ to make testing async code easier.")
python-setuptools
python-wheel))))
-(define-public python-cov-core
- (package
- (name "python-cov-core")
- (version "1.15.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "cov-core" version))
- (sha256
- (base32
- "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
- (build-system python-build-system)
- (propagated-inputs
- (list python-coverage))
- (home-page "https://github.com/schlamar/cov-core")
- (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
- (description
- "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
-and @code{nose2-cov}. It is useful for developing coverage plugins for these
-testing frameworks.")
- (license license:expat)))
-
(define-public python-codecov
(package
(name "python-codecov")
@@ -2743,24 +2695,6 @@ and commands. It contains functions to check things on the file system, and
tools for mocking system commands and recording calls to those.")
(license license:expat)))
-(define-public python-testlib
- (package
- (name "python-testlib")
- (version "0.6.5")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "testlib" version ".zip"))
- (sha256
- (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
- (build-system python-build-system)
- (native-inputs
- (list unzip)) ; for unpacking the source
- (synopsis "Python micro test suite harness")
- (description "A micro unittest suite harness for Python.")
- (home-page "https://github.com/trentm/testlib")
- (license license:expat)))
-
;;; The software provided by this package was integrated into pytest 2.8.
(define-public python-pytest-cache
(package
@@ -2841,28 +2775,6 @@ enables you to test server connections locally.")
across test runs.")
(license license:expat)))
-(define-public python-pytest-subtesthack
- (package
- (name "python-pytest-subtesthack")
- (version "0.1.1")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "pytest-subtesthack" version))
- (sha256
- (base32
- "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
- (build-system python-build-system)
- (propagated-inputs
- (list python-pytest))
- (synopsis "Set-up and tear-down fixtures for unit tests")
- (description "This plugin allows you to set up and tear down fixtures
-within unit test functions that use @code{py.test}. This is useful for using
-@command{hypothesis} inside py.test, as @command{hypothesis} will call the
-test function multiple times, without setting up or tearing down fixture state
-as is normally the case.")
- (home-page "https://github.com/untitaker/pytest-subtesthack/")
- (license license:unlicense)))
-
(define-public python-pytest-sugar
(package
(name "python-pytest-sugar")
@@ -3301,69 +3213,6 @@ pragmas to control it from within your code. Additionally, it is
possible to write plugins to add your own checks.")
(license license:gpl2+)))
-(define-public python-setuptools-lint
- (package
- (name "python-setuptools-lint")
- (version "0.6.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "setuptools-lint" version))
- (sha256
- (base32
- "16a1ac5n7k7sx15cnk03gw3fmslab3a7m74dc45rgpldgiff3577"))))
- (build-system python-build-system)
- (propagated-inputs (list python-tomli python-pylint))
- (home-page "https://github.com/johnnoone/setuptools-pylint")
- (synopsis "Run pylint with @command{python setup.py lint}")
- (description "This package expose pylint as a lint command into
-setup.py.")
- (license license:bsd-3)))
-
-(define-public python-paramunittest
- (package
- (name "python-paramunittest")
- (version "0.2")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "ParamUnittest" version))
- (sha256
- (base32
- "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
- (build-system python-build-system)
- (home-page
- "https://github.com/rik0/ParamUnittest")
- (synopsis
- "Simple extension to have parametrized unit tests")
- (description
- "This package creates parameterized unit-tests that work with the standard
-unittest package. A parameterized test case is automatically converted to multiple test
-cases. Since they are TestCase subclasses, they work with other test suites that
-recognize TestCases.")
- (license license:bsd-2)))
-
-(define-public python-pytest-warnings
- (package
- (name "python-pytest-warnings")
- (version "0.2.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "pytest-warnings" version))
- (sha256
- (base32
- "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
- (build-system python-build-system)
- (propagated-inputs
- (list python-pytest))
- (home-page "https://github.com/fschulze/pytest-warnings")
- (synopsis "Pytest plugin to list Python warnings in pytest report")
- (description
- "Python-pytest-warnings is a pytest plugin to list Python warnings in
-pytest report.")
- (license license:expat)
- (properties `((superseded unquote python-pytest)))))
-
(define-public python-pytest-capturelog
(package
(name "python-pytest-capturelog")
@@ -3534,32 +3383,6 @@ JSON APIs with Behave.")
directories to be excluded from testing.")
(license license:lgpl2.1+)))
-(define-public python-nose-random
- (package
- (name "python-nose-random")
- (version "1.0.0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/fzumstein/nose-random")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1dvip61r2frjv35mv6mmfjc07402z73pjbndfp3mhxyjn2zhksw2"))))
- (build-system python-build-system)
- (native-inputs
- (list python-nose))
- (home-page "https://github.com/fzumstein/nose-random")
- (synopsis "Nose plugin to facilitate randomized unit testing with
-Python")
- (description "Python nose-random is designed to facilitate
-Monte-Carlo style unit testing. The idea is to improve testing by
-running your code against a large number of randomly generated input
-scenarios.")
- (license license:expat)))
-
(define-public python-nose-timer
(package
(name "python-nose-timer")
@@ -3792,12 +3615,11 @@ tests. The output format is JSON.")
(list)
(list #:configure-flags #~(list "-DTROMPELOEIL_BUILD_TESTS=yes")))
(list
- #:test-target "test/self_test"
#:phases #~(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key tests? test-target #:allow-other-keys)
+ (lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (invoke test-target))))))))
+ (invoke "test/self_test"))))))))
(native-inputs (list catch2-3))
(home-page "https://github.com/rollbear/trompeloeil")
(synopsis "Header only C++14 mocking framework")
@@ -4245,41 +4067,6 @@ to mark some tests as dependent from other tests. These tests will then be
skipped if any of the dependencies did fail or has been skipped.")
(license license:asl2.0)))
-(define-public python-pytest-pudb
- ;; PyPi does not include tests
- (let ((commit "a6b3d2f4d35e558d72bccff472ecde9c9d9c69e5"))
- (package
- (name "python-pytest-pudb")
- ;; Version mentioned in setup.py version field.
- (version "0.7.0")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/wronglink/pytest-pudb")
- (commit commit)))
- (file-name (git-file-name name commit))
- (sha256
- (base32
- "1c0pypxx3y8w7s5bz9iy3w3aablnhn81rnhmb0is8hf2qpm6k3w0"))))
- (build-system python-build-system)
- (propagated-inputs (list pudb))
- (native-inputs (list python-pytest))
- (arguments
- `(#:phases (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key inputs outputs tests? #:allow-other-keys)
- (when tests?
- (add-installed-pythonpath inputs outputs)
- (invoke "pytest" "-v")))))))
- (home-page "https://github.com/wronglink/pytest-pudb")
- (synopsis "Pytest PuDB debugger integration")
- (description
- "@code{python-pytest-pudb} provides PuDB debugger integration based
-on pytest PDB integration. For example, the software developer can
-call pudb by running @code{py.test --pudb} from the command line or by
-including @code{pudb.set_trace} in their test file(s).")
- (license license:expat))))
-
(define-public python-pytest-datadir
(package
(name "python-pytest-datadir")