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:
David Steele
2020-03-15 10:09:27 -04:00
parent 19d975346b
commit d702249507
3 changed files with 29 additions and 64 deletions
@@ -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
(