From a4b9440d354c3cf95f7ca3aa68dc691c10c65e21 Mon Sep 17 00:00:00 2001 From: David Steele Date: Fri, 22 Nov 2019 19:25:49 -0500 Subject: [PATCH] Only install specific lcov version when required. Installing lcov 1.14 everywhere turned out to be a problem just as using 1.13 on Ubuntu 19.04 was. Since we primarily use Ubuntu 18.04 for coverage testing and reporting, we definitely want to make sure that works. So, revert to using the default packaged lcov except when specified otherwise in VmTest.pm. PostgreSQL minor version releases are also included since all containers have been rebuilt. --- doc/release.pl | 2 +- test/Vagrantfile | 8 +------ test/container.yaml | 14 +++++------ .../pgBackRestTest/Common/ContainerTest.pm | 24 +++++++++++++------ test/lib/pgBackRestTest/Common/VmTest.pm | 3 +++ 5 files changed, 29 insertions(+), 22 deletions(-) diff --git a/doc/release.pl b/doc/release.pl index 1212c0cb5..8f9aa2768 100755 --- a/doc/release.pl +++ b/doc/release.pl @@ -215,7 +215,7 @@ eval # Generate coverage summary &log(INFO, "Generate Coverage Summary"); executeTest( - "${strTestExe} --vm=u19 --no-package --no-valgrind --no-optimize --vm-max=3 --coverage-summary", + "${strTestExe} --no-package --no-valgrind --no-optimize --vm-max=3 --coverage-summary", {bShowOutputAsync => true}); } diff --git a/test/Vagrantfile b/test/Vagrantfile index bcb4b4e3f..b6a8cf7d7 100644 --- a/test/Vagrantfile +++ b/test/Vagrantfile @@ -68,13 +68,7 @@ Vagrant.configure(2) do |config| #--------------------------------------------------------------------------------------------------------------------------- echo 'Install Build Tools' && date apt-get install -y devscripts build-essential lintian git cloc txt2man debhelper libssl-dev zlib1g-dev libperl-dev \ - libxml2-dev liblz4-dev libpq-dev valgrind - - #--------------------------------------------------------------------------------------------------------------------------- - echo 'Build lcov' && date - wget -q -O - https://github.com/linux-test-project/lcov/releases/download/v1.14/lcov-1.14.tar.gz | tar zx -C /root - make -s -C /root/lcov-1.14 install - rm -rf /root/lcov-1.14 + libxml2-dev liblz4-dev libpq-dev valgrind lcov #--------------------------------------------------------------------------------------------------------------------------- echo 'Install Docker' && date diff --git a/test/container.yaml b/test/container.yaml index c9ead9cb8..e2a62c134 100644 --- a/test/container.yaml +++ b/test/container.yaml @@ -12,10 +12,10 @@ # - docker login -u pgbackrest # - VM=XXX;DATE=YYYYMMDDX;BASE=pgbackrest/test:${VM?}-base;docker tag ${BASE?} ${BASE?}-${DATE?} && docker push ${BASE?}-${DATE?} # ********************************************************************************************************************************** -20191012A: - f30: 3875f5a0a8ac8aa80746fb5f4a4a71ae7d8b6311 - co6: 1d27ba40e176accbc9fa9e0dc4020984635dc699 - co7: a3d54bb1fecc97978d5ec01f4515bbccd6546b32 - u12: 8f17ee30f3401591c27216447f6819dfc512c9f5 - u18: 9f504691c36f0b53bc4f94dc1d64ddf5c98119d9 - u19: 32d78710c7f60872ee4a8b2374d0110e015e2c24 +20191122A: + f30: 3a60318c275cdbfa6daa0f2b502a5551562e6db6 + co6: 63527115fd269dfee74bda70da8a5b0569f94886 + co7: 0b4c4b953709dc086f95fcc5c8ca45dee1a5eee9 + u12: 333122fe71a766b78398a1e86bafd1d8703fef1f + u18: c4dd9d5586eb67d77dfa6e0b89c5ebf9e27820a4 + u19: e68f7b969d12c2c43b47a83053a5241092c28524 diff --git a/test/lib/pgBackRestTest/Common/ContainerTest.pm b/test/lib/pgBackRestTest/Common/ContainerTest.pm index cc66ca5d9..7055c9ddd 100755 --- a/test/lib/pgBackRestTest/Common/ContainerTest.pm +++ b/test/lib/pgBackRestTest/Common/ContainerTest.pm @@ -392,6 +392,12 @@ sub containerBuild } } + # If no specific version of lcov is requested then install the default package + if (!defined($oVm->{$strOS}{&VMDEF_LCOV_VERSION})) + { + $strScript .= ' lcov'; + } + #--------------------------------------------------------------------------------------------------------------------------- $strScript .= sectionHeader() . "# Regenerate SSH keys\n" . @@ -431,14 +437,18 @@ sub containerBuild $strScript .= certSetup($strOS); #--------------------------------------------------------------------------------------------------------------------------- - my $strLCovPath = '/root/lcov-1.14'; + if (defined($oVm->{$strOS}{&VMDEF_LCOV_VERSION})) + { + my $strLCovVersion = $oVm->{$strOS}{&VMDEF_LCOV_VERSION}; + my $strLCovPath = "/root/lcov-${strLCovVersion}"; - $strScript .= sectionHeader() . - "# Build lcov\n" . - " wget -q -O - https://github.com/linux-test-project/lcov/releases/download/v1.14/lcov-1.14.tar.gz" . - " | tar zx -C /root && \\\n" . - " make -C ${strLCovPath} install && \\\n" . - " rm -rf ${strLCovPath}"; + $strScript .= sectionHeader() . + "# Build lcov ${strLCovVersion}\n" . + " wget -q -O - https://github.com/linux-test-project/lcov/releases/download/v${strLCovVersion}/" . + "lcov-${strLCovVersion}.tar.gz | tar zx -C /root && \\\n" . + " make -C ${strLCovPath} install && \\\n" . + " rm -rf ${strLCovPath}"; + } #--------------------------------------------------------------------------------------------------------------------------- if (!$bDeprecated) diff --git a/test/lib/pgBackRestTest/Common/VmTest.pm b/test/lib/pgBackRestTest/Common/VmTest.pm index f9fd478db..121016523 100644 --- a/test/lib/pgBackRestTest/Common/VmTest.pm +++ b/test/lib/pgBackRestTest/Common/VmTest.pm @@ -44,6 +44,8 @@ use constant VM_OS_REPO => 'os-repo' push @EXPORT, qw(VM_OS_REPO); use constant VMDEF_PGSQL_BIN => 'pgsql-bin'; push @EXPORT, qw(VMDEF_PGSQL_BIN); +use constant VMDEF_LCOV_VERSION => 'lcov-version'; + push @EXPORT, qw(VMDEF_LCOV_VERSION); use constant VMDEF_WITH_BACKTRACE => 'with-backtrace'; push @EXPORT, qw(VMDEF_WITH_BACKTRACE); @@ -425,6 +427,7 @@ my $oyVm = &VMDEF_COVERAGE_C => true, &VMDEF_PGSQL_BIN => '/usr/lib/postgresql/{[version]}/bin', + &VMDEF_LCOV_VERSION => '1.14', &VMDEF_WITH_BACKTRACE => true, &VM_DB =>