You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-09-16 09:06:18 +02:00
Designate a single distro (Ubuntu 16.04) for Perl coverage testing.
Running coverage testing on multiple distros takes time but doesn't add significant value. Also ensure that the distro designated to run coverage tests is one of the default test distros.
This commit is contained in:
@@ -87,6 +87,9 @@ use constant VM_EXPECT => VM_CO7;
|
||||
use constant VM_HOST_DEFAULT => VM_U16;
|
||||
push @EXPORT, qw(VM_HOST_DEFAULT);
|
||||
|
||||
# Defines the VM that will do coverage testing
|
||||
use constant VM_COVERAGE => VM_U16;
|
||||
|
||||
# Lists valid VMs
|
||||
use constant VM_LIST => (VM_CO6, VM_U16, VM_CO7, VM_U12);
|
||||
push @EXPORT, qw(VM_LIST);
|
||||
@@ -242,9 +245,15 @@ foreach my $strVm (sort(keys(%{$oyVm})))
|
||||
foreach my $strPgVersion (versionSupport())
|
||||
{
|
||||
my $strVmPgVersionRun;
|
||||
my $strVmCoverage;
|
||||
|
||||
foreach my $strVm (VM_LIST)
|
||||
{
|
||||
if ($strVm eq VM_COVERAGE)
|
||||
{
|
||||
$strVmCoverage = $strVm;
|
||||
}
|
||||
|
||||
foreach my $strVmPgVersion (@{$oyVm->{$strVm}{&VM_DB_TEST}})
|
||||
{
|
||||
if ($strPgVersion eq $strVmPgVersion)
|
||||
@@ -259,9 +268,16 @@ foreach my $strPgVersion (versionSupport())
|
||||
}
|
||||
}
|
||||
|
||||
my $strErrorSuffix = 'is not configured to run on a default vm';
|
||||
|
||||
if (!defined($strVmCoverage))
|
||||
{
|
||||
confess &log(ASSERT, 'vm designated for coverage testing (' . VM_COVERAGE . ") ${strErrorSuffix}");
|
||||
}
|
||||
|
||||
if (!defined($strVmPgVersionRun))
|
||||
{
|
||||
confess &log(ASSERT, "PostgreSQL ${strPgVersion} is not configured to run on a default vm");
|
||||
confess &log(ASSERT, "PostgreSQL ${strPgVersion} ${strErrorSuffix}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,7 +311,7 @@ sub vmCoverage
|
||||
{
|
||||
my $strVm = shift;
|
||||
|
||||
return $strVm eq VM_ALL ? false : vmBaseTest($strVm, VM_OS_BASE_DEBIAN);
|
||||
return ($strVm eq VM_COVERAGE ? true : false)
|
||||
}
|
||||
|
||||
push @EXPORT, qw(vmCoverage);
|
||||
|
Reference in New Issue
Block a user