1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-06 08:49:29 +02:00

Experimental 9.5 support. Unit tests are not working yet.

This commit is contained in:
David Steele
2015-06-14 10:12:36 -04:00
parent 0b6f81a812
commit b865070edd
6 changed files with 70 additions and 43 deletions

View File

@@ -787,7 +787,13 @@ sub BackRestTestCommon_Setup
# Get the Postgres version
my @stryVersionToken = split(/ /, $strOutLog);
@stryVersionToken = split(/\./, $stryVersionToken[2]);
$strCommonDbVersion = $stryVersionToken[0] . '.' . $stryVersionToken[1];
$strCommonDbVersion = $stryVersionToken[0] . '.' . trim($stryVersionToken[1]);
if ($strCommonDbVersion =~ /devel$/)
{
$strCommonDbVersion =~ s/devel$//;
&log(INFO, "Testing against ${strCommonDbVersion} development version");
}
# Don't run unit tests for unsupported versions
my $strVersionSupport = versionSupport();
@@ -796,6 +802,14 @@ sub BackRestTestCommon_Setup
{
confess "currently only version ${$strVersionSupport}[0] and up are supported";
}
if ($strCommonDbVersion eq '9.5')
{
&log(WARN, "unit tests do not currently work with version 9.5");
return false;
}
return true;
}
####################################################################################################################################

View File

@@ -252,49 +252,51 @@ eval
{
do
{
BackRestTestCommon_Setup($strTestPath, $stryTestVersion[0], $iModuleTestRun, $bDryRun, $bNoCleanup, $bLogForce);
&log(INFO, "TESTING psql-bin = $stryTestVersion[0]\n");
if ($bInfinite)
if (BackRestTestCommon_Setup($strTestPath, $stryTestVersion[0], $iModuleTestRun, $bDryRun, $bNoCleanup, $bLogForce))
{
$iRun++;
&log(INFO, "INFINITE - RUN ${iRun}\n");
}
&log(INFO, "TESTING psql-bin = $stryTestVersion[0]\n");
if ($strModule eq 'all' || $strModule eq 'utility')
{
BackRestTestUtility_Test($strModuleTest);
}
if ($strModule eq 'all' || $strModule eq 'config')
{
BackRestTestConfig_Test($strModuleTest);
}
if ($strModule eq 'all' || $strModule eq 'file')
{
BackRestTestFile_Test($strModuleTest);
}
if ($strModule eq 'all' || $strModule eq 'backup')
{
BackRestTestBackup_Test($strModuleTest, $iThreadMax);
if (@stryTestVersion > 1 && ($strModuleTest eq 'all' || $strModuleTest eq 'full'))
if ($bInfinite)
{
for (my $iVersionIdx = 1; $iVersionIdx < @stryTestVersion; $iVersionIdx++)
$iRun++;
&log(INFO, "INFINITE - RUN ${iRun}\n");
}
if ($strModule eq 'all' || $strModule eq 'utility')
{
BackRestTestUtility_Test($strModuleTest);
}
if ($strModule eq 'all' || $strModule eq 'config')
{
BackRestTestConfig_Test($strModuleTest);
}
if ($strModule eq 'all' || $strModule eq 'file')
{
BackRestTestFile_Test($strModuleTest);
}
if ($strModule eq 'all' || $strModule eq 'backup')
{
BackRestTestBackup_Test($strModuleTest, $iThreadMax);
if (@stryTestVersion > 1 && ($strModuleTest eq 'all' || $strModuleTest eq 'full'))
{
BackRestTestCommon_Setup($strTestPath, $stryTestVersion[$iVersionIdx], $iModuleTestRun, $bDryRun, $bNoCleanup);
&log(INFO, "TESTING psql-bin = $stryTestVersion[$iVersionIdx] for backup/full\n");
BackRestTestBackup_Test('full', $iThreadMax);
for (my $iVersionIdx = 1; $iVersionIdx < @stryTestVersion; $iVersionIdx++)
{
BackRestTestCommon_Setup($strTestPath, $stryTestVersion[$iVersionIdx],
$iModuleTestRun, $bDryRun, $bNoCleanup);
&log(INFO, "TESTING psql-bin = $stryTestVersion[$iVersionIdx] for backup/full\n");
BackRestTestBackup_Test('full', $iThreadMax);
}
}
}
}
if ($strModule eq 'compare')
{
BackRestTestCompare_Test($strModuleTest);
if ($strModule eq 'compare')
{
BackRestTestCompare_Test($strModuleTest);
}
}
}
while ($bInfinite);