From 2ec99ca4d9e40dcae628c2a435c8242bdcefabc2 Mon Sep 17 00:00:00 2001 From: David Steele Date: Wed, 12 Jun 2024 16:08:17 +1000 Subject: [PATCH] Specify test images that get valgrind installed. This means valgrind is no longer built from source, which caused image builds to run for a very long time. Valgrind is only required in a few images for testing. --- .github/workflows/test.yml | 4 +-- test/container.yaml | 15 +++++------ .../pgBackRestTest/Common/ContainerTest.pm | 26 +++---------------- 3 files changed, 11 insertions(+), 34 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aeab1f874..96b39039c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,8 +28,8 @@ jobs: # tackle the slowest tests first. matrix: include: - # All unit tests (without coverage) for 32-bit - - param: test --vm=d10 --param=no-performance --param=c-only + # All unit tests (without coverage or valgrind) for 32-bit + - param: test --vm=d10 --param=no-performance --param=no-coverage --param=no-valgrind --param=c-only # All integration tests for 32-bit - param: test --vm=d10 --param=module=mock --param=module=integration diff --git a/test/container.yaml b/test/container.yaml index eb1df6da1..cc74a67be 100644 --- a/test/container.yaml +++ b/test/container.yaml @@ -12,13 +12,10 @@ # - docker login -u pgbackrest # - VM=XXX;DATE=YYYYMMDDX;BASE=pgbackrest/test:${VM?}-base;docker tag ${BASE?} ${BASE?}-${DATE?} && docker push ${BASE?}-${DATE?} # ********************************************************************************************************************************** -20240611A: +20240612A: x86_64: - rh8: c3d005416527d96b5e8bcb1988c73c6f8557f48f - -20240530A: - x86_64: - d10: 890b52c1c95ba3dc2d6a6535b8d9e8b273db275d - f40: c52b4f20349d8037d74a4a4543d2e33cd52bb3fa - u20: 9ac8fc879f2a7934b31d9e9df56a6a617be6cbed - u22: 3dc2ae79283af572ebe9d79c8c6a1086f9537233 + d10: ff35751bb4be23b90441a228089d8851aad2b3a2 + f40: ae6241a28e5d8a6b6060d0ef00855f519ea45c24 + rh8: 84e3ece92ebc2650346a9ea783940d33ec2872db + u20: a754f9acc98c79a0b0ad3a39a140a752a27ac5e7 + u22: 233aa5805f958cc079efc851abd61bcdc20735e0 diff --git a/test/lib/pgBackRestTest/Common/ContainerTest.pm b/test/lib/pgBackRestTest/Common/ContainerTest.pm index b6a0202e8..21c8373cc 100644 --- a/test/lib/pgBackRestTest/Common/ContainerTest.pm +++ b/test/lib/pgBackRestTest/Common/ContainerTest.pm @@ -399,7 +399,7 @@ sub containerBuild $strScript .= " yum -y update && \\\n" . - " yum -y install openssh-server openssh-clients wget sudo valgrind git \\\n" . + " yum -y install openssh-server openssh-clients wget sudo git \\\n" . " perl perl-Digest-SHA perl-DBD-Pg perl-YAML-LibYAML openssl \\\n" . " gcc make perl-ExtUtils-MakeMaker perl-Test-Simple openssl-devel perl-ExtUtils-Embed rpm-build \\\n" . " libyaml-devel zlib-devel libxml2-devel lz4-devel lz4 bzip2-devel bzip2 perl-JSON-PP ccache meson \\\n" . @@ -410,20 +410,14 @@ sub containerBuild $strScript .= " export DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_FRONTEND=noninteractive && \\\n" . " apt-get update && \\\n" . - " apt-get install -y --no-install-recommends openssh-server wget sudo gcc make valgrind git \\\n" . + " apt-get install -y --no-install-recommends openssh-server wget sudo gcc make git \\\n" . " libdbd-pg-perl libhtml-parser-perl libssl-dev libperl-dev python3-distutils \\\n" . " libyaml-libyaml-perl tzdata devscripts lintian libxml-checker-perl txt2man debhelper \\\n" . " libppi-html-perl libtemplate-perl libtest-differences-perl zlib1g-dev libxml2-dev pkg-config \\\n" . " libbz2-dev bzip2 libyaml-dev libjson-pp-perl liblz4-dev liblz4-tool gnupg lsb-release ccache meson \\\n" . " libssh2-1-dev"; - # This package is required to build valgrind on 32-bit - if ($oVm->{$strOS}{&VM_ARCH} eq VM_ARCH_I386) - { - $strScript .= " g++-multilib"; - } - - if ($strOS eq VM_U22) + if ($strOS eq VM_U20 || $strOS eq VM_U22) { $strScript .= " valgrind"; } @@ -459,20 +453,6 @@ sub containerBuild " rm /etc/apt/apt.conf.d/70debconf"; } - #--------------------------------------------------------------------------------------------------------------------------- - if ($strOS ne VM_U22) - { - my $strValgrind = 'valgrind-3.17.0'; - - $strScript .= sectionHeader() . - "# Build valgrind\n" . - " wget -q -O - https://sourceware.org/pub/valgrind/${strValgrind}.tar.bz2 | tar jx -C /root && \\\n" . - " cd /root/${strValgrind} && \\\n" . - " ./configure --silent && \\\n" . - " make -s -j8 install && \\\n" . - " rm -rf /root/${strValgrind}"; - } - #--------------------------------------------------------------------------------------------------------------------------- if (!$bDeprecated) {