diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-04-23 09:58:36 +0900 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-04-23 11:25:18 +0900 |
commit | b12d44dd5e35ac236bf3fbb5619b9c8c2f42c902 (patch) | |
tree | 23bba9652580f1b74fecd5c0dac018ea69df5455 | |
parent | 15562902da00c97910d918c7bf825d6fc6a9f84b (diff) | |
download | guix-b12d44dd5e35ac236bf3fbb5619b9c8c2f42c902.tar.gz guix-b12d44dd5e35ac236bf3fbb5619b9c8c2f42c902.zip |
gnu: libssh: Enable tests.
* gnu/packages/ssh.scm (libssh) [arguments]
<#:configure-flags>: Add "-DUNIT_TESTING=ON".
<#:phases>: New argument.
[native-inputs]: Add cmocka.
Change-Id: Ibe0f8f7b9bff969c9483dcd8c6b7635d91e62feb
-rw-r--r-- | gnu/packages/ssh.scm | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index 877d129e91..5f0b3e2a6a 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -15,7 +15,7 @@ ;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com> -;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2020, 2021, 2022, 2025 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2023 Simon Streit <simon@netpanic.org> ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> @@ -158,16 +158,30 @@ file names. (build-system cmake-build-system) (outputs '("out" "debug")) (arguments - `(#:configure-flags '("-DWITH_GCRYPT=ON" - ,@(if (and (%current-target-system) - (not (target-64bit?))) - (list (string-append - "-DCMAKE_C_FLAGS=-g -O2" - " -Wno-incompatible-pointer-types")) - '())) - - ;; TODO: Add 'CMockery' and '-DWITH_TESTING=ON' for the test suite. - #:tests? #f)) + (list + #:configure-flags + #~(list "-DWITH_GCRYPT=ON" + "-DUNIT_TESTING=ON" + #$@(if (and (%current-target-system) + (not (target-64bit?))) + #~(list (string-append + "-DCMAKE_C_FLAGS=-g -O2" + " -Wno-incompatible-pointer-types")) + #~())) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'disable-problematic-tests + (lambda _ + ;; XXX: There is no finer-grain control on skipping tests using + ;; cmocka, short of patching sources, which isn't trivial with + ;; substitute*/sed. + (substitute* "tests/unittests/CMakeLists.txt" + ;; Some torture tests fail due to assuming the user directory + ;; (from the passwd database) matches HOME, and other fail for + ;; unknown reasons (see: + ;; https://gitlab.com/libssh/libssh-mirror/-/issues/302). + (("^ torture_(config|misc|options).*$") ""))))))) + (native-inputs (list cmocka)) (inputs (list zlib libgcrypt mit-krb5)) (synopsis "SSH client library") (description |