From 39ec5d22a62978c7f877de984835c2fb076d8e3b Mon Sep 17 00:00:00 2001 From: Andrei Pavel Date: Wed, 23 Apr 2025 13:15:24 +0300 Subject: [PATCH] [#3812] Hammer: Make sure we account for the case when hammer is called on another Kea source tree when installing SSL keys --- hammer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hammer.py b/hammer.py index 0faceb8f4a..71d070a882 100755 --- a/hammer.py +++ b/hammer.py @@ -1416,6 +1416,9 @@ def _configure_mysql(system, revision, features): execute('sudo mkdir -p {}'.format(cert_dir)) # Parent dir of hammer.py. p = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))) + if not os.path.isdir(f'{p}/src/lib/asiolink/testutils/ca'): + # Sometimes we call a standalone hammer.py on another Kea source tree. Let's use cwd in that case. + p = '.' for file in [ f'{p}/src/lib/asiolink/testutils/ca/kea-ca.crt', f'{p}/src/lib/asiolink/testutils/ca/kea-client.crt',