]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3350] revert to installing gtest sources for alpine and rpm
authorAndrei Pavel <andrei@isc.org>
Wed, 5 Jun 2024 12:05:04 +0000 (15:05 +0300)
committerAndrei Pavel <andrei@isc.org>
Wed, 5 Jun 2024 12:05:04 +0000 (15:05 +0300)
This is needed to make --with-gtest-source pass in jenkins.
There was a false misconception that all gtest packages install sources in
/usr/src/googletest. The reality is that alpine and rpm packages install shared
libraries instead.

hammer.py

index 036c941efd6b40487f41b0574c4f7f9b98a944ce..7d72d560704c4a5cc2f318fbf70e912b0494ad4c 100755 (executable)
--- a/hammer.py
+++ b/hammer.py
@@ -1689,7 +1689,8 @@ def install_packages_local(system, revision, features, check_times, ignore_error
             packages.extend(['cmake', 'git', 'pcre2-devel'])
 
         if 'unittest' in features:
-            packages.append('gtest')
+            packages.append('wget')
+            deferred_functions.append(_install_gtest_sources)
 
         install_pkgs(packages, timeout=300, env=env, check_times=check_times)
 
@@ -1742,7 +1743,8 @@ def install_packages_local(system, revision, features, check_times, ignore_error
             packages.extend(['cmake', 'git', 'pcre2-devel'])
 
         if 'unittest' in features:
-            packages.append('gtest')
+            packages.append('wget')
+            deferred_functions.append(_install_gtest_sources)
 
         install_pkgs(packages, env=env, check_times=check_times)
 
@@ -1795,11 +1797,8 @@ def install_packages_local(system, revision, features, check_times, ignore_error
             packages.extend(['cmake', 'git', 'pcre2-devel'])
 
         if 'unittest' in features:
-            if revision == '8':
-                packages.append('wget')
-                deferred_functions.append(_install_gtest_sources)
-            else:
-                packages.append('gtest')
+            packages.append('wget')
+            deferred_functions.append(_install_gtest_sources)
 
         install_pkgs(packages, env=env, timeout=120, check_times=check_times)
 
@@ -1833,7 +1832,8 @@ def install_packages_local(system, revision, features, check_times, ignore_error
             packages.extend(['cmake', 'git', 'pcre2-devel'])
 
         if 'unittest' in features:
-            packages.append('gtest')
+            packages.append('wget')
+            deferred_functions.append(_install_gtest_sources)
 
         execute('sudo dnf config-manager --set-enabled crb')
         install_pkgs(packages, env=env, timeout=120, check_times=check_times)
@@ -1977,10 +1977,10 @@ def install_packages_local(system, revision, features, check_times, ignore_error
         if 'netconf' in features:
             packages.extend(['cmake', 'git', 'pcre2'])
 
-        install_pkgs(packages, env=env, timeout=6 * 60, check_times=check_times)
-
         if 'unittest' in features:
-            packages.append(['googletest'])
+            packages.append('googletest')
+
+        install_pkgs(packages, env=env, timeout=6 * 60, check_times=check_times)
 
         if 'mysql' in features:
             execute('sudo sysrc mysql_enable="yes"', env=env, check_times=check_times)
@@ -2000,9 +2000,6 @@ def install_packages_local(system, revision, features, check_times, ignore_error
         if 'docs' in features:
             packages.extend(['py3-sphinx py3-sphinx_rtd_theme'])
 
-        if 'unittest' in features:
-            packages.append('gtest')
-
         if 'netconf' in features:
             packages.extend(['cmake', 'git', 'pcre2-dev'])
 
@@ -2021,6 +2018,10 @@ def install_packages_local(system, revision, features, check_times, ignore_error
         if 'ccache' in features:
             packages.extend(['ccache'])
 
+        if 'unittest' in features:
+            packages.append('wget')
+            deferred_functions.append(_install_gtest_sources)
+
         install_pkgs(packages, env=env, timeout=6 * 60, check_times=check_times)
 
         # check for existence of 'vagrant' user and 'abuild' group before adding him to the group