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.scm340
1 files changed, 161 insertions, 179 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 1f9cc26913..c6c078b08f 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -25,7 +25,7 @@
;;; Copyright © 2017, 2019 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2017 Nikita <nikita@n0.is>
;;; Copyright © 2015, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2017, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
;;; Copyright © 2019, 2021 Pierre Langlois <pierre.langlois@gmx.com>
@@ -68,6 +68,7 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-check)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
@@ -148,7 +149,27 @@ like Jasmine or Mocha.")
version "/check-" version ".tar.gz"))
(sha256
(base32
- "02m25y9m46pb6n46s51av62kpd936lkfv3b13kfpckgvmh5lxpm8"))))
+ "02m25y9m46pb6n46s51av62kpd936lkfv3b13kfpckgvmh5lxpm8"))
+ (patches
+ (list
+ ;; This patch fixes some tests that would otherwise fail on
+ ;; powerpc64le-linux. Without this patch, the tests make certain
+ ;; assumptions about floating point number precision that are not true
+ ;; on that platform.
+ ;;
+ ;; TODO: Remove this patch when updating to the next check release,
+ ;; since it will be included there. See:
+ ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47698
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://github.com/libcheck/check/commit/"
+ "4fbe702fa4f35bee8a90512f9f59d1441c4ae82e.patch"))
+ (file-name (string-append name
+ "-fix-test-precision-for-ppc.patch"))
+ (sha256
+ (base32
+ "04qg1p9afdd6453k18qskazrvscysdcjz9j6w4i6p5x4xyma19v6")))))))
(build-system gnu-build-system)
(home-page "https://libcheck.github.io/check/")
(synopsis "Unit test framework for C")
@@ -742,7 +763,7 @@ similar to unit tests.")
(define-public cpputest
(package
(name "cpputest")
- (version "3.8")
+ (version "4.0")
(source
(origin
(method url-fetch)
@@ -750,7 +771,7 @@ similar to unit tests.")
version "/cpputest-" version ".tar.gz"))
(sha256
(base32
- "0mk48xd3klyqi7wf3f4wn4zqxxzmvrhhl32r25jzrixzl72wq7f8"))))
+ "1xslavlb1974y5xvs8n1j9zkk05dlw8imy4saasrjlmibl895ii1"))))
(build-system gnu-build-system)
(native-inputs
`(("googletest" ,googletest)))
@@ -948,39 +969,48 @@ standard library.")
(define-public python-pytest
(package
(name "python-pytest")
- (version "5.3.5")
+ (version "6.2.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest" version))
(sha256
(base32
- "139i9cjhrv5aici3skq8iihvfb3lq0d8xb5j7qycr2hlk8cfjpqd"))))
+ "0jy5f83la1864ss42dhsi1mcm5nl79d8bjg7wk474nlw1c5avg2h"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'fix-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 _
+ (substitute* "setup.py"
+ (("setup\\(\\)")
+ (format #f "setup(version=~s)" ,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
- ;; 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)))))
+ ;; This test involve 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-atomicwrites" ,python-atomicwrites)
- ("python-attrs" ,python-attrs-bootstrap)
+ `(("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)))
(native-inputs
`(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
@@ -990,6 +1020,7 @@ standard library.")
("python-mock" ,python-mock)
("python-pytest" ,python-pytest-bootstrap)
("python-setuptools-scm" ,python-setuptools-scm)
+ ("python-toml" ,python-toml)
("python-xmlschema" ,python-xmlschema)))
(home-page "https://docs.pytest.org/en/latest/")
(synopsis "Python testing library")
@@ -1000,52 +1031,7 @@ and many external plugins.")
(license license:expat)
(properties `((python2-variant . ,(delay python2-pytest))))))
-(define-public python-pytest-6
- (package
- (inherit (strip-python2-variant python-pytest))
- (version "6.2.4")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "pytest" version))
- (sha256
- (base32
- "0jy5f83la1864ss42dhsi1mcm5nl79d8bjg7wk474nlw1c5avg2h"))))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-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 _
- (substitute* "setup.py"
- (("setup\\(\\)")
- (format #f "setup(version=~s)" ,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~%")))))))
- (propagated-inputs
- (append (alist-delete "python-py"
- (package-propagated-inputs python-pytest))
- `(("python-iniconfig" ,python-iniconfig)
- ("python-py" ,python-py-next))))
- (native-inputs
- (append (fold alist-delete (package-native-inputs python-pytest)
- '("python-mock"
- "python-pytest"))
- `(("python-pytest" ,python-pytest-6-bootstrap)
- ("python-toml" ,python-toml))))))
+(define-public python-pytest-6 python-pytest)
;; Pytest 4.x are the last versions that support Python 2.
(define-public python2-pytest
@@ -1087,19 +1073,12 @@ and many external plugins.")
(package
(inherit (strip-python2-variant python-pytest))
(name "python-pytest-bootstrap")
- (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm)))
+ (native-inputs `(("python-iniconfig" ,python-iniconfig)
+ ("python-setuptools-scm" ,python-setuptools-scm)
+ ("python-toml" ,python-toml)))
(arguments `(#:tests? #f))
(properties `((python2-variant . ,(delay python2-pytest-bootstrap))))))
-(define-public python-pytest-6-bootstrap
- (package
- (inherit (strip-python2-variant python-pytest-6))
- (name "python-pytest-bootstrap")
- (arguments `(#:tests? #f))
- (native-inputs
- `(("python-setuptools-scm" ,python-setuptools-scm)
- ("python-toml" ,python-toml)))))
-
(define-public python2-pytest-bootstrap
(hidden-package
(package/inherit
@@ -1391,20 +1370,32 @@ same arguments.")
(define-public python-pytest-xdist
(package
(name "python-pytest-xdist")
- ;; There is an issue that causes all releases after 1.34 to fail on Pytest
- ;; 5 (see: https://github.com/pytest-dev/pytest-xdist/issues/697).
- (version "1.34.0")
+ (version "2.1.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-xdist" version))
(sha256
(base32
- "1vh4ps32lp5ignch5adbl3pgchvigdfmrl6qpmhxih54wa1qw3il"))))
+ "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))))
(build-system python-build-system)
(arguments
- `(#:phases
+ '(#:tests? #f ; Lots of tests fail.
+ #: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)
(when tests?
@@ -1416,6 +1407,7 @@ same arguments.")
(propagated-inputs
`(("python-execnet" ,python-execnet)
("python-pytest" ,python-pytest)
+ ("python-py" ,python-py)
("python-pytest-forked" ,python-pytest-forked)))
(home-page
"https://github.com/pytest-dev/pytest-xdist")
@@ -1549,25 +1541,20 @@ subprocess and see the output as well as any file modifications.")
(define-public python-testtools-bootstrap
(package
(name "python-testtools-bootstrap")
- (version "2.3.0")
+ (version "2.5.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "testtools" version))
(sha256
(base32
- "0n8519lk8aaa91vymz842831181wf7fss98hyllhygi3z1nfq9sq"))
- (patches (search-patches "python-testtools.patch"))))
+ "0gxjbjk93jjqi491k4s9rh3ia37v21yifd35pvizv7sgv4rk9hap"))))
(build-system python-build-system)
(arguments '(#:tests? #f))
(propagated-inputs
`(("python-extras" ,python-extras)
("python-fixtures" ,python-fixtures-bootstrap)
- ("python-mimeparse" ,python-mimeparse)
- ("python-pbr" ,python-pbr-minimal)
- ("python-six" ,python-six)
- ("python-traceback2" ,python-traceback2)
- ("python-unittest2" ,python-unittest2)))
+ ("python-pbr" ,python-pbr-minimal)))
(home-page "https://github.com/testing-cabal/testtools")
(synopsis
"Extensions to the Python standard library unit testing framework")
@@ -1580,19 +1567,17 @@ subprocess and see the output as well as any file modifications.")
(inherit python-testtools-bootstrap)
(name "python-testtools")
(arguments
- `(#:phases (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (invoke "python" "-m" "testtools.run"
- "testtools.tests.test_suite"))))))
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "testtools.run"
+ "testtools.tests.test_suite")))))))
(propagated-inputs
`(("python-extras" ,python-extras)
("python-fixtures" ,python-fixtures)
- ("python-mimeparse" ,python-mimeparse)
- ("python-pbr" ,python-pbr)
- ("python-six" ,python-six)
- ("python-traceback2" ,python-traceback2)
- ("python-unittest2" ,python-unittest2)))
+ ("python-pbr" ,python-pbr)))
(native-inputs
`(("python-testscenarios" ,python-testscenarios-bootstrap)))
(description
@@ -1723,14 +1708,21 @@ protocol.")))
(package
(name "python-fixtures-bootstrap")
(version "3.0.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "fixtures" version))
- (sha256
- (base32
- "1vxj29bzz3rd4pcy51d05wng9q9dh4jq6wx92yklsm7i6h1ddw7w"))))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "fixtures" version))
+ (sha256
+ (base32
+ "1vxj29bzz3rd4pcy51d05wng9q9dh4jq6wx92yklsm7i6h1ddw7w"))
+ (patches (search-patches "python-fixtures-remove-monkeypatch-test.patch"))))
(build-system python-build-system)
- (arguments `(#:tests? #f))
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ ;; Package is not loadable on its own at this stage.
+ (delete 'sanity-check))))
(propagated-inputs
`(("python-pbr-minimal" ,python-pbr-minimal)
("python-six" ,python-six)))
@@ -1749,9 +1741,10 @@ python-fixtures package instead.")
'(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "python" "-m" "testtools.run"
- "fixtures.test_suite"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "testtools.run"
+ "fixtures.test_suite")))))))
(propagated-inputs
;; Fixtures uses pbr at runtime to check versions, etc.
`(("python-pbr" ,python-pbr)
@@ -1835,9 +1828,7 @@ executed.")
(define-public python-pytest-asyncio
(package
(name "python-pytest-asyncio")
- ;; Version 0.10.0 is the last version which is compatible with Pytest <=
- ;; 5.4.0.
- (version "0.10.0")
+ (version "0.15.1")
(source
(origin
(method git-fetch) ;for tests
@@ -1846,18 +1837,8 @@ executed.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32
- "1m63b7nbph5z20mn8jgh6j9ac873i1k4in29x44vrkw3qwfwg13y"))
- (patches (search-patches "python-pytest-asyncio-python-3.8.patch"))))
+ (base32 "03drs4myv1ik79148xyhli37q6mp931jb14cz65n8qvls2zvvwgx"))))
(build-system python-build-system)
- (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" "-vv")))))))
(native-inputs
`(("python-coverage" ,python-coverage)
("python-async-generator" ,python-async-generator)
@@ -2060,12 +2041,11 @@ framework which enables you to test server connections locally.")
`(("python-setuptools-scm" ,python-setuptools-scm)))
(propagated-inputs
`(("python-pytest" ,python-pytest)
- ("python-pytest-cache" ,python-pytest-cache)
("python-psutil" ,python-psutil)))
(synopsis "Pytest plugin to manage external processes across test runs")
(description "Pytest-xprocess is an experimental py.test plugin for managing
processes across test runs.")
- (home-page "https://github.com/pytest-dev/pytest-xprocess")
+ (home-page "https://github.com/pytest-dev/pytest-xprocess/")
(license license:expat)))
(define-public python-pytest-subtesthack
@@ -2119,13 +2099,13 @@ instantly.")
(define-public python-hypothesis
(package
(name "python-hypothesis")
- (version "5.4.1")
+ (version "6.0.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "hypothesis" version))
(sha256
(base32
- "0zn09bn6hadk4vxl6jy8bkjr5fz8mrhin3z46w7pq5qgbaycr89p"))))
+ "0wj7ip779naf2n076nylf2gi0sjz68z1ir9d9r2rgs7br18naqdf"))))
(build-system python-build-system)
(arguments
;; XXX: Tests are not distributed with the PyPI archive.
@@ -2142,18 +2122,6 @@ seamlessly into your existing Python unit testing work flow.")
(license license:mpl2.0)
(properties `((python2-variant . ,(delay python2-hypothesis))))))
-(define-public python-hypothesis-5.23
- (package
- (inherit python-hypothesis)
- (version "5.23.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "hypothesis" version))
- (sha256
- (base32
- "0sy1v6nyxg4rjcf3rlr8nalb7wqd9nccpb2lzkchbj5an13ysf1h"))))
- (home-page "https://github.com/HypothesisWorks/hypothesis")))
-
(define-public python-hypothesis-6.23
(package
(inherit python-hypothesis)
@@ -2184,19 +2152,19 @@ seamlessly into your existing Python unit testing work flow.")
(define-public python-hypothesmith
(package
(name "python-hypothesmith")
- (version "0.1.2")
+ (version "0.1.8")
(source
(origin
(method url-fetch)
(uri (pypi-uri "hypothesmith" version))
(sha256
(base32
- "09331sspknv459xcyn1k0lx5flqlc6gmnwp9370pfvg4kg1zmss6"))))
+ "02j101m5grjrbvrgjap17jsxd1hgawkylmyswcn33vf42mxh9zzr"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-hypothesis" ,python-hypothesis-5.23)
+ `(("python-hypothesis" ,python-hypothesis)
("python-lark-parser" ,python-lark-parser)
- ("python-libcst" ,python-libcst)))
+ ("python-libcst" ,python-libcst-minimal)))
(home-page "https://github.com/Zac-HD/hypothesmith")
(synopsis "Strategies for generating Python programs")
(description
@@ -2246,7 +2214,18 @@ failures.")
"06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
(build-system python-build-system)
(arguments
- `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
+ `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-dependencies
+ (lambda _
+ (substitute* "setup.py"
+ (("'pytest-cache', ") "")))) ; Included in recent pytest
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-v")))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(propagated-inputs
@@ -2331,29 +2310,25 @@ statements in the module it tests.")
(define-public python-pylint
(package
(name "python-pylint")
- (version "2.5.3")
+ (version "2.9.6")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/PyCQA/pylint")
- (commit (string-append "pylint-" version))))
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "04cgbh2z1mygar63plzziyz34yg6bdr4i0g63jp256fgnqwb1bi3"))))
+ (base32 "15yw69v1cj6zkndk60c2g0dgl0khh8bfm1lrwhjffpdjfc7nkc9a"))))
(build-system python-build-system)
- ;; FIXME: Tests are failing since version 2.4.3, see:
- ;; https://github.com/PyCQA/pylint/issues/3198.
- (arguments '(#:tests? #f))
(native-inputs
`(("python-pytest" ,python-pytest)
- ("python-pytest-runner" ,python-pytest-runner)
- ("python-tox" ,python-tox)))
+ ("python-pytest-benchmark" ,python-pytest-benchmark)
+ ("python-pytest-runner" ,python-pytest-runner)))
(propagated-inputs
`(("python-astroid" ,python-astroid)
("python-isort" ,python-isort)
("python-mccabe" ,python-mccabe)
- ("python-six" ,python-six)
("python-toml" ,python-toml)))
(home-page "https://github.com/PyCQA/pylint")
(synopsis "Python source code analyzer which looks for coding standard
@@ -2542,20 +2517,10 @@ backported from Python 2.7 for Python 2.4+.")
("python-pyhamcrest" ,python-pyhamcrest)
("python-pytest" ,python-pytest)))
(propagated-inputs
- `(("python-importlib-metadata" ,python-importlib-metadata)
- ("python-six" ,python-six)
- ("python-parse" ,python-parse)
+ `(("python-parse" ,python-parse)
("python-parse-type" ,python-parse-type)))
(arguments
- '(#:test-target "behave_test"
- #:phases
- (modify-phases %standard-phases
- (add-before 'check 'fix-library-loading
- (lambda _
- ;; Otherwise, tests fail with no module named 'path'
- (setenv "PYTHONPATH" (string-append (getenv "PYTHONPATH") ":"
- (getcwd) "/tasks/_vendor"))
- #t)))))
+ '(#:test-target "behave_test"))
(home-page "https://github.com/behave/behave")
(synopsis "Python behavior-driven development")
(description
@@ -2806,8 +2771,11 @@ retried.")
(sha256
(base32
"05kdzlhs2kvj82pfca13qszszcj6dyrk4b9pbr46x06sq2s4qyls"))))
- (native-inputs
- `(("python-pytest" ,python-pytest)))
+ (native-inputs ;all native inputs are for tests
+ `(("python-pytest-cov" ,python-pytest-cov)
+ ("python-mock" ,python-mock)
+ ("python-pytest" ,python-pytest)
+ ("python-hypothesis" ,python-hypothesis)))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
@@ -2849,7 +2817,7 @@ portable to just about any platform.")
(define-public libfaketime
(package
(name "libfaketime")
- (version "0.9.8")
+ (version "0.9.9")
(home-page "https://github.com/wolfcw/libfaketime")
(source (origin
(method git-fetch)
@@ -2858,35 +2826,41 @@ portable to just about any platform.")
(commit (string-append "v" version))))
(sha256
(base32
- "1mfdl82ppgbdvy1ny8mb7xii7p0g7awvn4bn36jb8v4r545slmjc"))
+ "1gi1xciqga5hl2xlk7rc3j8wy47ag97pi7ngmdl6ny1d11b2wn1z"))
(file-name (git-file-name name version))))
(build-system gnu-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
+ `(#: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" "gcc")
+ (setenv "CC" ,(cc-for-target))
(setenv "PREFIX" out)
;; XXX: Without this flag, the CLOCK_REALTIME test hangs
;; indefinitely. See README.packagers for more information.
- ;; Try removing this for future versions of libfaketime.
- (setenv "FAKETIME_COMPILE_CFLAGS" "-DFORCE_MONOTONIC_FIX")
-
- #t)))
+ ;; There are specific instructions to not enable more flags
+ ;; than absolutely needed.
+ ,(if (target-ppc64le?)
+ `(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")))
-
- ;; Do not fail due to use of 'ftime', which was deprecated in
- ;; glibc 2.31. Remove this for later versions of libfaketime.
- (setenv "FAKETIME_COMPILE_CFLAGS" "-Wno-deprecated-declarations")
- #t)))
+ (("/bin/bash") (which "bash"))))))
#:test-target "test"))
(native-inputs
`(("perl" ,perl))) ;for tests
+ (inputs
+ `(("coreutils" ,coreutils)))
(synopsis "Fake the system time for single applications")
(description
"The libfaketime library allows users to modify the system time that an
@@ -2989,13 +2963,21 @@ grew out of the @dfn{Vc} project.")
(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 _
(invoke
"python" "-m" "pytest"
- "pyfakefs/pytest_tests/pytest_plugin_test.py")
- #t)))))
+ "pyfakefs/pytest_tests/pytest_plugin_test.py"))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(build-system python-build-system)