@@ -1690,12 +1690,10 @@ def install_packages_local(system, revision, features, check_times, ignore_error
1690
1690
if 'netconf' in features :
1691
1691
packages .extend (['cmake' , 'git' , 'pcre2-devel' ])
1692
1692
1693
- install_pkgs (packages , timeout = 300 , env = env , check_times = check_times )
1694
-
1695
1693
if 'unittest' in features :
1696
- if int ( revision ) >= 37 :
1697
- install_pkgs ([ 'flex' , 'bison' ], timeout = 300 , env = env , check_times = check_times )
1698
- _install_gtest_sources ( )
1694
+ packages . append ( 'gtest' )
1695
+
1696
+ install_pkgs ( packages , timeout = 300 , env = env , check_times = check_times )
1699
1697
1700
1698
execute ('sudo dnf clean packages' , env = env , check_times = check_times )
1701
1699
@@ -1746,8 +1744,7 @@ def link_pg_config():
1746
1744
packages .extend (['cmake' , 'git' , 'pcre2-devel' ])
1747
1745
1748
1746
if 'unittest' in features :
1749
- packages .append ('wget' )
1750
- deferred_functions .append (_install_gtest_sources )
1747
+ packages .append ('gtest' )
1751
1748
1752
1749
install_pkgs (packages , env = env , check_times = check_times )
1753
1750
@@ -1798,8 +1795,11 @@ def link_pg_config():
1798
1795
packages .extend (['cmake' , 'git' , 'pcre2-devel' ])
1799
1796
1800
1797
if 'unittest' in features :
1801
- packages .append ('wget' )
1802
- deferred_functions .append (_install_gtest_sources )
1798
+ if revision == '8' :
1799
+ packages .append ('wget' )
1800
+ deferred_functions .append (_install_gtest_sources )
1801
+ else :
1802
+ packages .append ('gtest' )
1803
1803
1804
1804
install_pkgs (packages , env = env , timeout = 120 , check_times = check_times )
1805
1805
@@ -1833,8 +1833,7 @@ def link_pg_config():
1833
1833
packages .extend (['cmake' , 'git' , 'pcre2-devel' ])
1834
1834
1835
1835
if 'unittest' in features :
1836
- packages .append ('wget' )
1837
- deferred_functions .append (_install_gtest_sources )
1836
+ packages .append ('gtest' )
1838
1837
1839
1838
execute ('sudo dnf config-manager --set-enabled crb' )
1840
1839
install_pkgs (packages , env = env , timeout = 120 , check_times = check_times )
@@ -1851,10 +1850,7 @@ def link_pg_config():
1851
1850
'texlive' , 'texlive-latex-extra' , 'tex-gyre' ])
1852
1851
1853
1852
if 'unittest' in features :
1854
- if revision .startswith ('16.' ):
1855
- _install_gtest_sources ()
1856
- else :
1857
- packages .append ('googletest' )
1853
+ packages .append ('googletest' )
1858
1854
1859
1855
if 'native-pkg' in features :
1860
1856
packages .extend (['build-essential' , 'fakeroot' , 'devscripts' ])
@@ -1901,11 +1897,7 @@ def link_pg_config():
1901
1897
'tex-gyre' , 'texlive' , 'texlive-latex-extra' ])
1902
1898
1903
1899
if 'unittest' in features :
1904
- if revision == '8' :
1905
- # libgtest-dev does not work and googletest is not available
1906
- _install_gtest_sources ()
1907
- else :
1908
- packages .append ('googletest' )
1900
+ packages .append ('googletest' )
1909
1901
1910
1902
if 'netconf' in features :
1911
1903
packages .extend (['cmake' , 'git' , 'libpcre2-dev' ])
@@ -1991,7 +1983,7 @@ def link_pg_config():
1991
1983
install_pkgs (packages , env = env , timeout = 6 * 60 , check_times = check_times )
1992
1984
1993
1985
if 'unittest' in features :
1994
- _install_gtest_sources ( )
1986
+ packages . append ([ 'googletest' ] )
1995
1987
1996
1988
if 'mysql' in features :
1997
1989
execute ('sudo sysrc mysql_enable="yes"' , env = env , check_times = check_times )
@@ -2012,7 +2004,7 @@ def link_pg_config():
2012
2004
packages .extend (['py3-sphinx py3-sphinx_rtd_theme' ])
2013
2005
2014
2006
if 'unittest' in features :
2015
- _install_gtest_sources ( )
2007
+ packages . append ( 'gtest' )
2016
2008
2017
2009
if 'netconf' in features :
2018
2010
packages .extend (['cmake' , 'git' , 'pcre2-dev' ])
0 commit comments