mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-06-20 01:17:49 +02:00
Build binaries in the test path rather than the vagrant path.
It makes more sense to build in the test path since many developers won't have a vagrant path. Anyway, it's better not to modify the vagrant path since it belongs to vagrant. Instead of installing the binary just mount it into the container from where it was built. This saves a bit of time and space.
This commit is contained in:
@@ -66,12 +66,12 @@ sub new
|
||||
|
||||
# Create the host
|
||||
my $strProjectPath = dirname(dirname(abs_path($0)));
|
||||
my $strBinPath = dirname(dirname($strTestPath)) . '/bin/' . testRunGet()->vm() . '/' . PROJECT_EXE;
|
||||
my $strContainer = 'test-' . testRunGet()->vmId() . "-$strName";
|
||||
|
||||
my $self = $class->SUPER::new(
|
||||
$strName, $strContainer, $$oParam{strImage}, $$oParam{strUser}, testRunGet()->vm(),
|
||||
["${strProjectPath}:${strProjectPath}", "${strTestPath}:${strTestPath}"
|
||||
,dirname(dirname($strTestPath)) . '/cover_db:' . dirname(dirname($strTestPath)) . '/cover_db']);
|
||||
["${strProjectPath}:${strProjectPath}", "${strTestPath}:${strTestPath}", "${strBinPath}:${strBinPath}:ro"]);
|
||||
bless $self, $class;
|
||||
|
||||
# Set test path
|
||||
@@ -80,9 +80,6 @@ sub new
|
||||
# Set permissions on the test path
|
||||
$self->executeSimple('chown -R ' . $self->userGet() . ':'. TEST_GROUP . ' ' . $self->testPath(), undef, 'root');
|
||||
|
||||
# Install bin and Perl C Library
|
||||
jobInstallC(testRunGet()->basePath(), $self->{strOS}, $strContainer);
|
||||
|
||||
# Return from function and log return values if any
|
||||
return logDebugReturn
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user