]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3812] Hammer: Make sure we account for the case when hammer is called on another...
authorAndrei Pavel <andrei@isc.org>
Wed, 23 Apr 2025 10:15:24 +0000 (13:15 +0300)
committerAndrei Pavel <andrei@isc.org>
Wed, 23 Apr 2025 10:15:24 +0000 (13:15 +0300)
hammer.py

index 0faceb8f4a7699f9a18971dd1d14a08e58c19c96..71d070a8824270520b6517eb27e7eb4e47f660d0 100755 (executable)
--- 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',