1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-09-16 09:06:18 +02:00

Automate generation of WAL and pg_control test files.

The existing static files would not work with 32-bit or big-endian systems so create functions to generate these files dynamically rather than creating a bunch of new static files.
This commit is contained in:
David Steele
2017-11-18 20:02:54 -05:00
parent b701cd5a5f
commit 8a3425ec04
42 changed files with 1173 additions and 985 deletions

View File

@@ -316,18 +316,8 @@ sub run
storageDb()->pathCreate(
$oHostDbMaster->dbPath() . '/testbase/' . DB_PATH_GLOBAL,
{strMode => '0700', bIgnoreExists => true, bCreateParent => true});
if ($self->pgVersion() eq PG_VERSION_94)
{
storageDb()->copy(
$self->dataPath() . '/backup.pg_control_' . WAL_VERSION_95 . '.bin',
$oHostDbMaster->dbPath() . '/testbase/' . DB_FILE_PGCONTROL);
} else
{
storageDb()->copy(
$self->dataPath() . '/backup.pg_control_' . WAL_VERSION_94 . '.bin',
$oHostDbMaster->dbPath() . '/testbase/' . DB_FILE_PGCONTROL);
}
$self->controlGenerate(
$oHostDbMaster->dbPath() . '/testbase', $self->pgVersion() eq PG_VERSION_94 ? PG_VERSION_95 : PG_VERSION_94);
if (!$bRepoEncrypt)
{