From fd10e544097b058a81ee89e0d8b93cecd13a4786 Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com> Date: Fri, 29 Oct 2021 15:04:40 +0200 Subject: libssh2: skip the testsuite when docker is not installed (#26962) The build-time testsuite which would be run when building with tests needs docker. Check that it exists before attempting to execute the tests. Co-authored-by: Massimiliano Culpo --- var/spack/repos/builtin/packages/libssh2/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/libssh2/package.py b/var/spack/repos/builtin/packages/libssh2/package.py index 7b9beb7b14..933a996b03 100644 --- a/var/spack/repos/builtin/packages/libssh2/package.py +++ b/var/spack/repos/builtin/packages/libssh2/package.py @@ -32,3 +32,8 @@ class Libssh2(CMakePackage): # The shared library is not installed correctly on Darwin; fix this if self.spec.satisfies('platform=darwin'): fix_darwin_install_name(self.prefix.lib) + + def check(self): + # Docker is required to run tests + if which('docker'): + make('test') -- cgit v1.2.3-70-g09d2