summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2025-04-23 09:58:36 +0900
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2025-04-23 11:25:18 +0900
commitb12d44dd5e35ac236bf3fbb5619b9c8c2f42c902 (patch)
tree23bba9652580f1b74fecd5c0dac018ea69df5455 /gnu/packages
parent15562902da00c97910d918c7bf825d6fc6a9f84b (diff)
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
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/ssh.scm36
1 files changed, 25 insertions, 11 deletions
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index 877d129e918..5f0b3e2a6a9 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -15,7 +15,7 @@
15;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com> 15;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
16;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org> 16;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
17;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com> 17;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
18;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> 18;;; Copyright © 2020, 2021, 2022, 2025 Maxim Cournoyer <maxim.cournoyer@gmail.com>
19;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> 19;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
20;;; Copyright © 2023 Simon Streit <simon@netpanic.org> 20;;; Copyright © 2023 Simon Streit <simon@netpanic.org>
21;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> 21;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
@@ -158,16 +158,30 @@ file names.
158 (build-system cmake-build-system) 158 (build-system cmake-build-system)
159 (outputs '("out" "debug")) 159 (outputs '("out" "debug"))
160 (arguments 160 (arguments
161 `(#:configure-flags '("-DWITH_GCRYPT=ON" 161 (list
162 ,@(if (and (%current-target-system) 162 #:configure-flags
163 (not (target-64bit?))) 163 #~(list "-DWITH_GCRYPT=ON"
164 (list (string-append 164 "-DUNIT_TESTING=ON"
165 "-DCMAKE_C_FLAGS=-g -O2" 165 #$@(if (and (%current-target-system)
166 " -Wno-incompatible-pointer-types")) 166 (not (target-64bit?)))
167 '())) 167 #~(list (string-append
168 168 "-DCMAKE_C_FLAGS=-g -O2"
169 ;; TODO: Add 'CMockery' and '-DWITH_TESTING=ON' for the test suite. 169 " -Wno-incompatible-pointer-types"))
170 #:tests? #f)) 170 #~()))
171 #:phases
172 #~(modify-phases %standard-phases
173 (add-after 'unpack 'disable-problematic-tests
174 (lambda _
175 ;; XXX: There is no finer-grain control on skipping tests using
176 ;; cmocka, short of patching sources, which isn't trivial with
177 ;; substitute*/sed.
178 (substitute* "tests/unittests/CMakeLists.txt"
179 ;; Some torture tests fail due to assuming the user directory
180 ;; (from the passwd database) matches HOME, and other fail for
181 ;; unknown reasons (see:
182 ;; https://gitlab.com/libssh/libssh-mirror/-/issues/302).
183 (("^ torture_(config|misc|options).*$") "")))))))
184 (native-inputs (list cmocka))
171 (inputs (list zlib libgcrypt mit-krb5)) 185 (inputs (list zlib libgcrypt mit-krb5))
172 (synopsis "SSH client library") 186 (synopsis "SSH client library")
173 (description 187 (description