diff options
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r-- | gnu/packages/check.scm | 330 |
1 files changed, 146 insertions, 184 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 96450b47bd..1d9a4413f1 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2015, 2017 Cyril Roelandt <[email protected]> ;;; Copyright © 2015 Federico Beffa <[email protected]> ;;; Copyright © 2015 Andreas Enge <[email protected]> -;;; Copyright © 2015, 2016, 2018-2022 Efraim Flashner <[email protected]> +;;; Copyright © 2015, 2016, 2018-2023 Efraim Flashner <[email protected]> ;;; Copyright © 2016, 2017 Leo Famulari <[email protected]> ;;; Copyright © 2016 Christine Lemmer-Webber <[email protected]> ;;; Copyright © 2016, 2017 Danny Milosavljevic <[email protected]> @@ -35,7 +35,7 @@ ;;; Copyright © 2020 Josh Marshall <[email protected]> ;;; Copyright © 2020 Vinicius Monego <[email protected]> ;;; Copyright © 2020 Tanguy Le Carrour <[email protected]> -;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <[email protected]> +;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer <[email protected]> ;;; Copyright © 2021 Hugo Lecomte <[email protected]> ;;; Copyright © 2022 Maxime Devos <[email protected]> ;;; Copyright © 2022 David Elsing <[email protected]> @@ -100,6 +100,7 @@ #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (guix build-system trivial) + #:use-module (guix deprecation) #:use-module (srfi srfi-1)) (define-public pict @@ -721,7 +722,7 @@ format.") (define-public cppcheck (package (name "cppcheck") - (version "2.3") + (version "2.10") (source (origin (method git-fetch) (uri (git-reference @@ -729,7 +730,7 @@ format.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "03ic5mig3ryzkf85r95ryagf84s7y5nd6sqr915l3zj30apnifvz")))) + (base32 "0riq7jlv21v2p77r01i36ll3klbgnkpsfk1wx4q8p1v5h5zgkkaa")))) (build-system cmake-build-system) (arguments '(#:configure-flags '("-DBUILD_TESTS=ON"))) @@ -943,7 +944,7 @@ test coverage and has a web user interface that will refresh automatically.") (define-public googletest (package (name "googletest") - (version "1.11.0") + (version "1.12.1") (source (origin (method git-fetch) @@ -952,7 +953,7 @@ test coverage and has a web user interface that will refresh automatically.") (commit (string-append "release-" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0pd4y1gpx1z8fiyarkvqlmk6hbv0lc8fr00ivnsvqzi1xg34jfaa")))) + (base32 "1cv55x3amwrvfan9pr8dfnicwr8r6ar3yf6cg9v6nykd6m2v3qsv")))) (build-system cmake-build-system) (arguments `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"))) @@ -1084,13 +1085,13 @@ syntax validation, ... (define-public python-parameterized (package (name "python-parameterized") - (version "0.7.4") + (version "0.8.1") (source (origin (method url-fetch) (uri (pypi-uri "parameterized" version)) (sha256 - (base32 "1444fdz5bj0k10nmhxv0bv2gfrfisi7hfzqdndb0pvhf4g3qq3qr")))) + (base32 "0p1vhfw552rgd7gb2vy4l4l4k8mnbdz7f3chgzvk0r0qsqvzzfs1")))) (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases @@ -1245,57 +1246,54 @@ standard library.") (define-public python-pytest (package (name "python-pytest") - (version "6.2.5") + (version "7.1.3") (source (origin (method url-fetch) (uri (pypi-uri "pytest" version)) (sha256 (base32 - "12cyi0lnyaq8sdqfnqlppd76gkw6zcg10gyih5knx9v611l3c6qk")))) + "0f8c31v5r2kgjixvy267n0nhc4xsy65g3n9lz1i1377z5pn5ydjg")))) (build-system python-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'build 'pretend-version - ;; The version string is usually derived via setuptools-scm, but - ;; without the git metadata available, the version string is set to - ;; '0.0.0'. - (lambda _ - (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version))) - (replace 'check - (lambda* (#:key (tests? #t) #:allow-other-keys) - (setenv "TERM" "dumb") ;attempt disabling markup tests - (if tests? - (invoke "pytest" "-vv" "-k" - (string-append - ;; This test involves the /usr directory, and fails. - " not test_argcomplete" - ;; These test do not honor the isatty detection and - ;; fail. - " and not test_code_highlight" - " and not test_color_yes")) - (format #t "test suite not run~%"))))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'pretend-version + ;; The version string is usually derived via setuptools-scm, but + ;; without the git metadata available, the version string is set to + ;; '0.0.0'. + (lambda _ + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" + #$(package-version this-package)))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (setenv "TERM" "dumb") ;attempt disabling markup tests + (if tests? + (invoke "pytest" "-vv" "-k" + (string-append + ;; This test involves the /usr directory, and fails. + " not test_argcomplete" + ;; These test do not honor the isatty detection and + ;; fail. + " and not test_code_highlight" + " and not test_color_yes")) + (format #t "test suite not run~%"))))))) (propagated-inputs - `(("python-attrs" ,python-attrs-bootstrap) - ("python-iniconfig" ,python-iniconfig) - ("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-toml" ,python-toml) - ("python-wcwidth" ,python-wcwidth))) + (list python-attrs-bootstrap + python-iniconfig + python-packaging-bootstrap + python-pluggy + python-py + python-tomli)) (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-toml" ,python-toml) - ("python-xmlschema" ,python-xmlschema))) + ;; Tests need the "regular" bash since 'bash-final' lacks `compgen`. + (list bash + python-hypothesis + python-nose + python-pytest-bootstrap + python-setuptools-scm + python-xmlschema)) (home-page "https://docs.pytest.org/en/latest/") (synopsis "Python testing library") (description @@ -1304,7 +1302,8 @@ and functions, detailed info on failing assert statements, modular fixtures, and many external plugins.") (license license:expat))) -(define-public python-pytest-6 python-pytest) +(define-deprecated python-pytest-6 python-pytest) +(export python-pytest-6) ;; Astropy started using hard dependencies for Pytest 7+, which might ;; happen for some other projects. It could be set as default in staging. @@ -1337,7 +1336,7 @@ and many external plugins.") (inherit python-pytest) (name "python-pytest-bootstrap") (native-inputs (list python-iniconfig python-setuptools-scm - python-toml)) + python-tomli)) (arguments `(#:tests? #f)))) (define-public python-pytest-assume @@ -1527,28 +1526,39 @@ Python's @code{random.seed}.") (define-public python-pytest-runner (package (name "python-pytest-runner") - (version "5.2") + (version "6.0.0") (source (origin (method url-fetch) (uri (pypi-uri "pytest-runner" version)) (sha256 (base32 - "0awll1bva5zy8cspsxcpv7pjcrdf5c6pf56nqn4f74vvmlzfgiwn")))) + "11dnhxnjmh4nf1j8rnvx944ha3wg8ggrgrwdcx4c7d19xmi57n5l")))) (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))))) + (list + ;; FIXME: The test suite requires 'python-flake8' and 'python-black', + ;; but that introduces a circular dependency. + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (replace 'build + (lambda _ + (let ((circa-1980 (* 10 366 24 60 60))) + (setenv "SOURCE_DATE_EPOCH" (number->string circa-1980)) + (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))) + (replace 'install + (lambda _ + (let ((whl (car (find-files "dist" "\\.whl$")))) + (invoke "pip" "--no-cache-dir" "--no-input" + "install" "--no-deps" "--prefix" #$output whl)))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (invoke "pytest" "-vv") + (format #t "test suite not run~%"))))))) (native-inputs - (list python-setuptools-scm)) + (list python-pypa-build python-setuptools-scm python-wheel)) (home-page "https://github.com/pytest-dev/pytest-runner") (synopsis "Invoke py.test as a distutils command") (description @@ -1632,44 +1642,26 @@ same arguments.") (define-public python-pytest-xdist (package (name "python-pytest-xdist") - (version "2.1.0") + (version "2.5.0") (source (origin (method url-fetch) (uri (pypi-uri "pytest-xdist" version)) (sha256 (base32 - "0wh6pn66nncfs6ay0n863bgyriwsgppn8flx5l7551j1lbqkinc2")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Remove pre-compiled .pyc files from source. - (for-each delete-file-recursively - (find-files "." "__pycache__" #:directories? #t)) - (for-each delete-file (find-files "." "\\.pyc$")) - #t)))) + "1psf5dqxvc38qzxvc305mkg5xpdmdkbkkfiyqlmdnkgh7z5dx025")))) (build-system python-build-system) (arguments - '(#:tests? #f ; Lots of tests fail. - #:phases + '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-setup-py - (lambda _ - ;; Relax pytest requirement. - (substitute* "setup.py" - (("pytest>=6\\.0\\.0") "pytest")))) (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (lambda* (#:key tests? #:allow-other-keys) (when tests? - (add-installed-pythonpath inputs outputs) (invoke "pytest" "-vv" "-n" (number->string (parallel-job-count))))))))) - (native-inputs - (list python-setuptools-scm)) - (propagated-inputs - (list python-execnet python-pytest python-py python-pytest-forked)) - (home-page - "https://github.com/pytest-dev/pytest-xdist") + (native-inputs (list python-setuptools-scm python-filelock python-pytest)) + (propagated-inputs (list python-execnet python-pytest-forked)) + (home-page "https://github.com/pytest-dev/pytest-xdist") (synopsis "Plugin for py.test with distributed testing and loop-on-failing modes") (description @@ -1681,20 +1673,6 @@ program code to a remote location, executes there, and then syncs the result back.") (license license:expat))) -(define-public python-pytest-xdist-next - (package/inherit python-pytest-xdist - (name "python-pytest-xdist") - (version "2.5.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pytest-xdist" version)) - (sha256 - (base32 - "1psf5dqxvc38qzxvc305mkg5xpdmdkbkkfiyqlmdnkgh7z5dx025")))) - (propagated-inputs (list python-execnet python-pytest - python-pytest-forked)))) - (define-public python-pytest-timeout (package (name "python-pytest-timeout") @@ -1788,19 +1766,18 @@ subprocess and see the output as well as any file modifications.") (define-public python-testtools-bootstrap (package (name "python-testtools-bootstrap") - (version "2.5.0") + (version "2.6.0") (source (origin (method url-fetch) (uri (pypi-uri "testtools" version)) (sha256 (base32 - "0gxjbjk93jjqi491k4s9rh3ia37v21yifd35pvizv7sgv4rk9hap")))) + "02mkphygx8897617m8qnmj0alksyvvfcjmazzfxyrlzjq0a5xdi8")))) (build-system python-build-system) (arguments '(#:tests? #f)) (propagated-inputs - `(("python-extras" ,python-extras) - ("python-fixtures" ,python-fixtures-bootstrap) + `(("python-fixtures" ,python-fixtures-bootstrap) ("python-pbr" ,python-pbr-minimal))) (home-page "https://github.com/testing-cabal/testtools") (synopsis @@ -1822,7 +1799,7 @@ subprocess and see the output as well as any file modifications.") (invoke "python" "-m" "testtools.run" "testtools.tests.test_suite"))))))) (propagated-inputs - (list python-extras python-fixtures python-pbr)) + (list python-fixtures python-pbr)) (native-inputs `(("python-testscenarios" ,python-testscenarios-bootstrap))) (description @@ -1962,7 +1939,7 @@ protocol."))) ;; Package is not loadable on its own at this stage. (delete 'sanity-check)))) (propagated-inputs - (list python-pbr-minimal python-six)) + (list python-pbr-minimal python-six python-extras)) (home-page "https://launchpad.net/python-fixtures") (synopsis "Python test fixture library") (description @@ -1984,7 +1961,7 @@ python-fixtures package instead.") "fixtures.test_suite"))))))) (propagated-inputs ;; Fixtures uses pbr at runtime to check versions, etc. - (list python-pbr python-six)) + (list python-pbr python-six python-extras)) (native-inputs `(("python-mock" ,python-mock) ("python-testtools" ,python-testtools-bootstrap))) @@ -2035,18 +2012,20 @@ have failed since the last commit or what tests are currently failing."))) (define-public python-coverage (package (name "python-coverage") - (version "5.5") + (version "6.4.3") (source (origin (method url-fetch) (uri (pypi-uri "coverage" version)) (sha256 (base32 - "0b112ly7vvplvm9l411aqknxhr7fzfyp28xhflhkcx78l3lqzrzb")))) + "157vndwrzyv9ypn2w3b6g8gv7vw07v994hq8nxasdb75k3ry2apc")))) (build-system python-build-system) (arguments ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors. '(#:tests? #f)) + (propagated-inputs + (list python-tomli)) (home-page "https://coverage.readthedocs.io") (synopsis "Code coverage measurement for Python") (description @@ -2318,20 +2297,24 @@ instantly.") (define-public python-hypothesis (package (name "python-hypothesis") - (version "6.0.2") + (version "6.54.5") (source (origin (method url-fetch) (uri (pypi-uri "hypothesis" version)) (sha256 (base32 - "0wj7ip779naf2n076nylf2gi0sjz68z1ir9d9r2rgs7br18naqdf")))) + "1ivyrjpnahvj359pfndnk8x3h0gw37kqm02fmnzibx4mas15d44a")))) (build-system python-build-system) (arguments ;; XXX: Tests are not distributed with the PyPI archive. - '(#:tests? #f)) + (list #:tests? #f + #:phases + #~(modify-phases %standard-phases + ;; XXX: hypothesis requires pytest at runtime, but we can + ;; not propagate it due to a circular dependency. + (delete 'sanity-check)))) (propagated-inputs - `(("python-attrs" ,python-attrs-bootstrap) - ("python-sortedcontainers" ,python-sortedcontainers))) + (list python-attrs-bootstrap python-exceptiongroup python-sortedcontainers)) (synopsis "Library for property based testing") (description "Hypothesis is a library for testing your Python code against a much larger range of examples than you would ever want to write by hand. It’s @@ -2340,20 +2323,8 @@ seamlessly into your existing Python unit testing work flow.") (home-page "https://hypothesis.works/") (license license:mpl2.0))) -;;; TODO: Make the default python-hypothesis in the next rebuild cycle. -(define-public python-hypothesis-next - (package - (inherit python-hypothesis) - (version "6.43.3") - (source (origin - (method url-fetch) - (uri (pypi-uri "hypothesis" version)) - (sha256 - (base32 - "0d67dlc5a47i48fxzmji2mnybzby0h1wdscmj54555fghcyp1045")))) - (propagated-inputs - (modify-inputs (package-propagated-inputs python-hypothesis) - (append python-pytest))))) ;to satisfy the sanity-check phase +(define-deprecated python-hypothesis-next python-hypothesis) +(export python-hypothesis-next) (define-public python-hypothesmith (package @@ -2379,23 +2350,24 @@ programs, something like CSmith, a random generator of C programs.") (define-public python-lit (package (name "python-lit") - (version "14.0.3") + (version "16.0.0") (source (origin (method url-fetch) (uri (pypi-uri "lit" version)) (sha256 (base32 - "162x7pddwl395c3mdb0mfn3f5z24x1jz6g27x303lfxpzidnn4m4")))) + "04dyv8b2nbdbn61zdgm042a21dwidyapn9zbinlf879a29rc6jiw")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (replace 'check - (lambda _ - (invoke "python" "lit.py" "tests")))))) + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python" "lit.py" "tests"))))))) (native-inputs - (list llvm)) + (list llvm-14)) (home-page "https://llvm.org/") (synopsis "LLVM Software Testing Tool") (description "@code{lit} is a portable tool for executing LLVM and Clang @@ -2666,7 +2638,7 @@ statements in the module it tests.") (define-public python-pylint (package (name "python-pylint") - (version "2.12.2") + (version "2.14.5") (source (origin (method git-fetch) @@ -2675,7 +2647,7 @@ statements in the module it tests.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0spmy7j1vvh55shzgma80q61y0d1cj45dcgslb4g5w3y602miq5i")))) + (base32 "0ljfvyzr2i07pi7m19kbshlc3cfnwr53mjhcpydaa0w8bak4cc95")))) (build-system python-build-system) (arguments `(#:phases @@ -2694,10 +2666,11 @@ statements in the module it tests.") (list python-pytest python-pytest-xdist)) (propagated-inputs (list python-astroid + python-dill python-isort python-mccabe python-platformdirs - python-toml + python-tomlkit python-typing-extensions)) (home-page "https://github.com/PyCQA/pylint") (synopsis "Advanced Python code static checker") @@ -3169,7 +3142,7 @@ portable to just about any platform.") (define-public libfaketime (package (name "libfaketime") - (version "0.9.9") + (version "0.9.10") (home-page "https://github.com/wolfcw/libfaketime") (source (origin (method git-fetch) @@ -3178,42 +3151,40 @@ portable to just about any platform.") (commit (string-append "v" version)))) (sha256 (base32 - "1gi1xciqga5hl2xlk7rc3j8wy47ag97pi7ngmdl6ny1d11b2wn1z")) + "112l7x2gv4f47hpffpb8djfwvgrs8w5h9s266h1fshi1c916x10d")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'embed-date-reference - (lambda* (#:key inputs #:allow-other-keys) - (let ((coreutils (assoc-ref inputs "coreutils"))) - (substitute* "src/faketime.c" - (("\"date\"") - (string-append "\"" coreutils "/bin/date\"")))))) - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (setenv "CC" ,(cc-for-target)) - (setenv "PREFIX" out) - - ;; XXX: Without this flag, the CLOCK_REALTIME test hangs - ;; indefinitely. See README.packagers for more information. - ;; There are specific instructions to not enable more flags - ;; than absolutely needed. - ,(if (or (target-ppc64le?) - (target-riscv64?)) - `(setenv "FAKETIME_COMPILE_CFLAGS" - "-DFORCE_MONOTONIC_FIX -DFORCE_PTHREAD_NONVER") - `(setenv "FAKETIME_COMPILE_CFLAGS" - "-DFORCE_MONOTONIC_FIX"))))) - (add-before 'check 'pre-check - (lambda _ - (substitute* "test/functests/test_exclude_mono.sh" - (("/bin/bash") (which "bash")))))) - #:test-target "test")) - (native-inputs - (list perl)) ;for tests - (inputs - (list coreutils)) + (list + #:test-target "test" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'embed-date-reference + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "src/faketime.c" + (("\"date\"") + (format #f "~s" (search-input-file inputs "bin/date")))))) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (setenv "CC" #$(cc-for-target)) + (setenv "PREFIX" #$output) + + ;; XXX: Without this flag, the CLOCK_REALTIME test hangs + ;; indefinitely. See README.packagers for more information. + ;; There are specific instructions to not enable more flags + ;; than absolutely needed. + #$@(if (or (target-ppc64le?) + (target-riscv64?)) + #~((setenv "FAKETIME_COMPILE_CFLAGS" + "-DFORCE_MONOTONIC_FIX -DFORCE_PTHREAD_NONVER")) + #~((setenv "FAKETIME_COMPILE_CFLAGS" + "-DFORCE_MONOTONIC_FIX"))))) + (add-before 'check 'pre-check + (lambda _ + (substitute* "test/functests/test_exclude_mono.sh" + (("/bin/bash") (which "bash")))))))) + (native-inputs (list perl)) ;for tests + (inputs (list coreutils-minimal)) (synopsis "Fake the system time for single applications") (description "The libfaketime library allows users to modify the system time that an @@ -3317,7 +3288,7 @@ grew out of the @dfn{Vc} project.") (define-public python-pyfakefs (package (name "python-pyfakefs") - (version "3.7.1") + (version "4.6.3") (source (origin (method url-fetch) ;; We use the PyPI URL because there is no proper release @@ -3326,22 +3297,13 @@ grew out of the @dfn{Vc} project.") (uri (pypi-uri "pyfakefs" version)) (sha256 (base32 - "1cp2yw96fa2qkgi39xa3nlr3inf8wb5rgh9kdq53256ca2r8pdhy")) + "18bcv8yalg80zgigx40fk692yr3wf9ch1hkb0cdplqspyry2mwbd")) (patches (search-patches "python-pyfakefs-remove-bad-test.patch")) (file-name (string-append name "-" version ".tar.gz")))) (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-testsuite - (lambda _ - ;; Time difference is larger than expected. - (substitute* "pyfakefs/tests/fake_filesystem_unittest_test.py" - (("(\\s+)def test_copy_real_file" all indent) - (string-append - indent - "@unittest.skip('disabled by guix')\n" - all))))) ;; The default test suite does not run these extra tests. (add-after 'check 'check-pytest-plugin (lambda _ |