summary refs log tree commit diff
path: root/gnu/packages/check.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r--gnu/packages/check.scm186
1 files changed, 140 insertions, 46 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index fb5bcadf83..32aedf5b6b 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -35,8 +35,9 @@
 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
-;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
+;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -90,6 +91,45 @@
   #:use-module (guix build-system trivial)
   #:use-module (srfi srfi-1))
 
+(define-public pict
+  (package
+    (name "pict")
+    (version "3.7.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Microsoft/pict")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0bpyl0zklw2fyxgynrc7shg0xamw8rr68zmh528niscrpavsmfpi"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:test-target "test"
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure)
+          (replace 'install
+            (lambda _
+              (install-file "pict" (string-append #$output "/bin"))
+              (install-file "doc/pict.md"
+                            (string-append #$output
+                                           "/share/doc/pict-" #$version)))))))
+    (native-inputs (list perl))
+    (home-page "https://www.pairwise.org/")
+    (synopsis "Pairwise Independent Combinatorial Tool")
+    (description "PICT is a pairwise testing tool that generates test cases
+and test configurations.  With PICT, you can generate tests that are more
+effective than manually generated tests and in a fraction of the time required
+by hands-on test case design.  PICT runs as a command line tool.  It takes a
+model file detailing the parameters of the interface as an input and generates
+a compact set of parameter value choices that represent the test cases you
+should use to get comprehensive combinatorial coverage of your parameters.")
+    (license license:expat)))
+
 (define-public pedansee
   (package
     (name "pedansee")
@@ -209,45 +249,46 @@ source code editors and IDEs.")
 (define-public clitest
   (package
     (name "clitest")
-    (version "0.3.0")
+    (version "0.4.0")
     (home-page "https://github.com/aureliojargas/clitest")
     (source (origin
               (method git-fetch)
-              (uri (git-reference
-                    (url home-page)
-                    (commit (string-append "v" version))))
+              (uri (git-reference (url home-page) (commit version)))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0zw5wra9hc717srmcar1wm4i34kyj8c49ny4bb7y3nrvkjp2pdb5"))))
+                "1p745mxiq3hgi3ywfljs5sa1psi06awwjxzw0j9c2xx1b09yqv4a"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         ;; This package is distributed as a single shell script and comes
-         ;; without a proper build system.
-         (delete 'configure)
-         (delete 'build)
-         (replace 'check
-           (lambda _
-             (substitute* "test.md"
-               ;; One test looks for an error from grep in the form "grep: foo",
-               ;; but our grep returns the absolute file name on errors.  Adjust
-               ;; the test to cope with that.
-               (("sed 's/\\^e\\*grep: \\.\\*/")
-                "sed 's/.*e*grep: .*/"))
-
-             (setenv "HOME" "/tmp")
-             (invoke "./clitest" "test.md")))
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (install-file "clitest" (string-append out "/bin"))
-               (install-file "README.md"
-                             (string-append out "/share/doc/clitest-" ,version))
-               #t))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; This package is distributed as a single shell script and comes
+          ;; without a proper build system.
+          (delete 'configure)
+          (delete 'build)
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (substitute* "test.md"
+                  ;; One test looks for an error from grep in the form "grep: foo",
+                  ;; but our grep returns the absolute file name on errors.  Adjust
+                  ;; the test to cope with that.
+                  (("sed 's/\\^e\\*grep: \\.\\*/")
+                   "sed 's/.*e*grep: .*/"))
+
+                (setenv "HOME" "/tmp")
+                (invoke "./clitest" "test.md"))))
+          (replace 'install
+            (lambda _
+              (install-file "clitest" (string-append #$output "/bin"))
+              (install-file "README.md"
+                            (string-append #$output "/share/doc/clitest-"
+                                           #$(package-version this-package))))))))
     (native-inputs
      (list perl))                 ;for tests
+    (inputs
+     (list bash-minimal))
     (synopsis "Command line test tool")
     (description
      "@command{clitest} is a portable shell script that performs automatic
@@ -421,7 +462,7 @@ a multi-paradigm automated test framework for C++ and Objective-C.")
 (define-public catch-framework2
   (package
     (name "catch2")
-    (version "2.13.2")
+    (version "2.13.8")
     (home-page "https://github.com/catchorg/Catch2")
     (source (origin
               (method git-fetch)
@@ -431,7 +472,7 @@ a multi-paradigm automated test framework for C++ and Objective-C.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "100r0kmra8jmra2hv92lzvwcmphpaiccwvq3lpdsa5b7hailhach"))))
+                "18a6d7rcb6ilhxd5dff32jkfdf2ik58pbywrv04ras70217kdq4c"))))
     (build-system cmake-build-system)
     (inputs
      (list python-wrapper))
@@ -565,15 +606,16 @@ and it supports a very flexible form of test discovery.")
 (define-public doctest
   (package
     (name "doctest")
-    (version "2.4.6")
+    (version "2.4.8")
     (home-page "https://github.com/onqtam/doctest")
     (source (origin
               (method git-fetch)
-              (uri (git-reference (url home-page) (commit version)))
+              (uri (git-reference (url home-page)
+                                  (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "14m3q6d96zg6d99x1152jkly50gdjrn5ylrbhax53pfgfzzc5yqx"))))
+                "057wdkv3gcz42mh1j284sgvm16i5fk1f9b1plgvavca70q4p52gz"))))
     (build-system cmake-build-system)
     (synopsis "C++ test framework")
     (description
@@ -2695,13 +2737,13 @@ mocks, stubs and fakes.")
 (define-public python-flaky
   (package
     (name "python-flaky")
-    (version "3.5.3")
+    (version "3.7.0")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "flaky" version))
               (sha256
                (base32
-                "1nm1kjf857z5aw7v642ffsy1vwf255c6wjvmil71kckjyd0mxg8j"))))
+                "03daz352021211kvdb056f3afrd2gsdq0rd1awgr38910xw01l9s"))))
     (build-system python-build-system)
     (arguments
      ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
@@ -2807,7 +2849,8 @@ portable to just about any platform.")
                         ;; indefinitely.  See README.packagers for more information.
                         ;; There are specific instructions to not enable more flags
                         ;; than absolutely needed.
-                        ,(if (target-ppc64le?)
+                        ,(if (or (target-ppc64le?)
+                                 (target-riscv64?))
                            `(setenv "FAKETIME_COMPILE_CFLAGS"
                                     "-DFORCE_MONOTONIC_FIX -DFORCE_PTHREAD_NONVER")
                            `(setenv "FAKETIME_COMPILE_CFLAGS"
@@ -2843,13 +2886,27 @@ provides a simple way to achieve this.")
                 "0xmi24ckpps32k7hc139psgbsnsf4g106sv4l9m445m46amkxggd"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-test
-           (lambda _
-             (substitute* "tests/test-umockdev.c"
-               (("/run") "/tmp"))
-             #t)))))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-test
+                 (lambda _
+                   (substitute* "tests/test-umockdev.c"
+                     (("/run") "/tmp"))))
+               ;; Avoid having to set 'LD_LIBRARY_PATH' to use umockdev
+               ;; via introspection.
+               (add-after 'unpack 'absolute-introspection-library
+                 (lambda _
+                   (substitute* "Makefile.in"
+                     (("g-ir-compiler -l libumockdev")
+                      (string-append "g-ir-compiler -l " #$output
+                                     "/lib/libumockdev")))))
+               (add-after 'install 'absolute-filenames
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   ;; 'patch-shebangs' will take care of the shebang.
+                   (substitute* (string-append #$output "/bin/umockdev-wrapper")
+                     (("env") (search-input-file inputs "bin/env"))
+                     (("libumockdev")
+                      (string-append #$output "/lib/libumockdev"))))))))
     (native-inputs
      (list vala
            gobject-introspection
@@ -2859,7 +2916,9 @@ provides a simple way to achieve this.")
            python
            which))
     (inputs
-     (list glib eudev libgudev))
+     (list bash-minimal ;for umockdev-wrapper
+           coreutils-minimal ;for bin/env
+           glib eudev libgudev))
     (home-page "https://github.com/martinpitt/umockdev/")
     (synopsis "Mock hardware devices for creating unit tests")
     (description "umockdev mocks hardware devices for creating integration
@@ -3023,6 +3082,41 @@ 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")