summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTomas Volf <~@wolfsden.cz>2023-12-02 01:28:54 +0100
committerLudovic Courtès <ludo@gnu.org>2023-12-06 23:50:05 +0100
commitfb2bbb0c3e9734006a4108a5c4f9901dbf15edae (patch)
treedf78b638bd1cba12f6673d7bdac630a7db0b5966 /gnu
parent0399d5b6101522901b69b985010736505fdf9354 (diff)
gnu: libtorrent-rasterbar: Update to 1.2.19.
With the update, the execution of the test suite was overhauled a lot. Parallel tests were disabled, since the do not work well. Since faketime does cause some tests to hang, test_ssl was moved into a separate run. * gnu/packages/bittorrent.scm (libtorrent-rasterbar)[version]: Update to 1.2.19. [arguments]<#:parallel-tests?>: Disable. [arguments]<#:phases>: Move test_ssl into separate run under faketime. Do not run under tests under faketime. Anchor the regex for test exclusion. Set timeout of 600 seconds for each test. Change-Id: I7392cb3ce1a8815b26b3257498082761255535ee Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/bittorrent.scm46
1 files changed, 30 insertions, 16 deletions
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index 6f75a92cffa..e115c130174 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -417,7 +417,7 @@ and will take advantage of multiple processor cores where possible.")
417(define-public libtorrent-rasterbar 417(define-public libtorrent-rasterbar
418 (package 418 (package
419 (name "libtorrent-rasterbar") 419 (name "libtorrent-rasterbar")
420 (version "1.2.18") 420 (version "1.2.19")
421 (source 421 (source
422 (origin 422 (origin
423 (method url-fetch) 423 (method url-fetch)
@@ -426,35 +426,49 @@ and will take advantage of multiple processor cores where possible.")
426 "releases/download/v" version "/" 426 "releases/download/v" version "/"
427 "libtorrent-rasterbar-" version ".tar.gz")) 427 "libtorrent-rasterbar-" version ".tar.gz"))
428 (sha256 428 (sha256
429 (base32 "0wpsaqadcicxl4lf1nc1i93c4yzjv8hpzhhrw1hdkrp4gn0vdwpy")))) 429 (base32 "03p4nvsll568zlyqifid0cn135sg5whbk7g48gkbapnw92ayks7f"))))
430 (build-system cmake-build-system) 430 (build-system cmake-build-system)
431 (arguments 431 (arguments
432 `(#:configure-flags '("-Dpython-bindings=ON" 432 `(#:configure-flags '("-Dpython-bindings=ON"
433 "-Dbuild_tests=ON") 433 "-Dbuild_tests=ON")
434 ;; Tests do not reliably work when executed in parallel.
435 #:parallel-tests? #f
434 #:phases 436 #:phases
435 (modify-phases %standard-phases 437 (modify-phases %standard-phases
436 (add-after 'unpack 'extend-test-timeout
437 (lambda _
438 (substitute* "test/test_remove_torrent.cpp"
439 ;; Extend the test timeout from 3 seconds to 10.
440 (("i > 30") "i > 100"))))
441 (replace 'check 438 (replace 'check
442 (lambda* (#:key tests? parallel-tests? #:allow-other-keys) 439 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
443 (let ((disabled-tests 440 (let* ((disabled-tests
444 ;; test_upnp requires a non-localhost IPv4 interface. 441 '(
445 '("test_upnp"))) 442 ;; Requires a non-localhost IPv4 interface.
443 "test_upnp"
444 ;; test_ssl needs to be run separately.
445 "test_ssl"))
446 (exclude-regex (string-append "^("
447 (string-join disabled-tests "|")
448 ")$"))
449 (timeout "600")
450 (jobs (if parallel-tests?
451 (number->string (parallel-job-count))
452 "1")))
446 (when tests? 453 (when tests?
454 (invoke "ctest"
455 "-E" exclude-regex
456 "-j" jobs
457 "--timeout" timeout
458 "--output-on-failure")
447 ;; test_ssl relies on bundled TLS certificates with a fixed 459 ;; test_ssl relies on bundled TLS certificates with a fixed
448 ;; expiry date. To ensure succesful builds in the future, 460 ;; expiry date. To ensure succesful builds in the future,
449 ;; fake the time to be roughly that of the release. 461 ;; fake the time to be roughly that of the release.
450 (setenv "FAKETIME_ONLY_CMDS" "test_ssl") 462 ;;
463 ;; At the same time, faketime happens to cause
464 ;; test_fast_extension, test_privacy and test_resolve_links
465 ;; to hang, even with FAKETIME_ONLY_CMDS. Not sure why. So
466 ;; execute only test_ssl under faketime.
451 (invoke "faketime" "2022-10-24" 467 (invoke "faketime" "2022-10-24"
452 "ctest" 468 "ctest"
453 "--exclude-regex" (string-join disabled-tests "|") 469 "-R" "^test_ssl$"
454 "-j" (if parallel-tests? 470 "-j" jobs
455 (number->string (parallel-job-count)) 471 "--timeout" timeout
456 "1")
457 "--rerun-failed"
458 "--output-on-failure")))))))) 472 "--output-on-failure"))))))))
459 (inputs (list boost openssl)) 473 (inputs (list boost openssl))
460 (native-inputs 474 (native-inputs