gnu: python-locust: Update to 2.15.1.

* gnu/packages/benchmark.scm (python-locust): Update to 2.15.1.
[arguments]: Delete relax-requirements phase.  Add increase-resource-limits.
Update check phase.
[propagated-inputs]: Remove python-jinja2.
This commit is contained in:
Maxim Cournoyer 2023-03-31 09:36:56 -04:00
parent 5cfb866484
commit c0936d6608
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -8,7 +8,7 @@
;;; Copyright © 2019, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2020 malte Frank Gerdes <malte.f.gerdes@gmail.com> ;;; Copyright © 2020 malte Frank Gerdes <malte.f.gerdes@gmail.com>
;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Greg Hogan <code@greghogan.com> ;;; Copyright © 2020 Greg Hogan <code@greghogan.com>
;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl> ;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl>
@ -382,39 +382,55 @@ (define (mark-as-non-free directory)
(define-public python-locust (define-public python-locust
(package (package
(name "python-locust") (name "python-locust")
(version "2.8.6") (version "2.15.1")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "locust" version)) (uri (pypi-uri "locust" version))
(sha256 (sha256
(base32 (base32
"1gn13j758j36knlcdyyyggn60rpw98iqdkvl3kjsz34brysic6q1")))) "05cznfqda0yq2j351jjdssayvj5qc11xkbkwdvv81hcmz4xpyc56"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
'(#:phases '(#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'relax-requirements (add-before 'check 'increase-resource-limits
(lambda _ (lambda _
(substitute* "setup.py" ;; XXX: Copied from ungoogled-chromium.
(("setuptools_scm<=6.0.1") ;; Try increasing the soft resource limit of max open files to 2048,
"setuptools_scm") ;; or equal to the hard limit, whichever is lower.
(("Jinja2<3.1.0") (call-with-values (lambda () (getrlimit 'nofile))
"Jinja2")))) (lambda (soft hard)
(when (and soft (< soft 2048))
(if hard
(setrlimit 'nofile (min hard 2048) hard)
(setrlimit 'nofile 2048 #f))
(format #t
"increased maximum number of open files from ~d to ~d~%"
soft (if hard (min hard 2048) 2048)))))))
(replace 'check (replace 'check
(lambda* (#:key tests? #:allow-other-keys) (lambda* (#:key tests? #:allow-other-keys)
(when tests? (when tests?
(invoke "python" "-m" "pytest" "locust" (invoke "python" "-m" "pytest" "locust"
"-k" (string-join "-k" (string-join
'(;; These tests return "non-zero exit status 1". '( ;; These tests return "non-zero exit status 1".
"not test_default_headless_spawn_options" "not test_default_headless_spawn_options"
"not test_default_headless_spawn_options_with_shape" "not test_default_headless_spawn_options_with_shape"
"not test_headless_spawn_options_wo_run_time" "not test_headless_spawn_options_wo_run_time"
;; These tests fail with a HTTP return code of
;; 500 instead of 200, for unknown reasons.
"not test_autostart_mutliple_locustfiles_with_shape"
"not test_autostart_w_load_shape"
"not test_autostart_wo_run_time"
"not test_percentile_parameter"
;; These tests depend on networking. ;; These tests depend on networking.
"not test_html_report_option" "not test_html_report_option"
"not test_json_schema"
"not test_web_options" "not test_web_options"
;; This test fails because of the warning "System open ;; These tests fail because of the warning
;; file limit '1024' is below minimum setting '10000'". ;; "System open file limit '1024' is below
;; minimum setting '10000'".
"not test_autostart_w_run_time"
"not test_skip_logging" "not test_skip_logging"
;; On some (slow?) machines, the following tests ;; On some (slow?) machines, the following tests
;; fail, with the processes returning exit code ;; fail, with the processes returning exit code
@ -433,7 +449,6 @@ (define-public python-locust
python-flask-cors python-flask-cors
python-gevent python-gevent
python-geventhttpclient python-geventhttpclient
python-jinja2
python-msgpack python-msgpack
python-psutil python-psutil
python-pyzmq python-pyzmq