Skip to content
Permalink
Browse files

Add build-max option to set max build processes.

Currently this controls make processes via -j.
  • Loading branch information...
dwsteele committed Apr 24, 2019
1 parent c11c936 commit 1ae8a6a71665c12bec6e20741df29ba4792bf8f8
Showing with 16 additions and 6 deletions.
  1. +4 −0 doc/xml/release.xml
  2. +3 −1 test/lib/pgBackRestTest/Common/JobTest.pm
  3. +9 −5 test/test.pl
@@ -89,6 +89,10 @@
<p>Add <code>harnessInfoChecksum/Z()</code> to ease creation of test info files.</p>
</release-item>

<release-item>
<p>Add <id>build-max</id> option to set max build processes.</p>
</release-item>

<release-item>
<p>Reduce <proper>ScalityS3</proper> processes since only two are needed.</p>
</release-item>
@@ -75,6 +75,7 @@ sub new
$self->{bProfile},
$self->{bDebug},
$self->{bDebugTestTrace},
$self->{iBuildMax},
) =
logDebugParam
(
@@ -103,6 +104,7 @@ sub new
{name => 'bProfile'},
{name => 'bDebug'},
{name => 'bDebugTestTrace'},
{name => 'iBuildMax'},
);

# Set try to 0
@@ -246,7 +248,7 @@ sub run
$strCommand =
'docker exec -i -u ' . TEST_USER . " ${strImage} bash -l -c '" .
"cd $self->{strGCovPath} && " .
"make -s 2>&1 &&" .
"make -j $self->{iBuildMax} -s 2>&1 &&" .
($self->{oTest}->{&TEST_VM} ne VM_CO6 && $self->{bValgrindUnit}?
" valgrind -q --gen-suppressions=all --suppressions=$self->{strGCovPath}/test/valgrind.suppress" .
" --leak-check=full --leak-resolution=high --error-exitcode=25" : '') .
@@ -79,6 +79,7 @@ =head1 SYNOPSIS
--log-force force overwrite of current test log files
--no-lint disable static source code analysis
--build-only compile the test library / packages and run tests only
--build-max max processes to use for builds (default 4)
--coverage-only only run coverage tests (as a subset of selected tests)
--c-only only run C tests
--gen-only only run auto-generation
@@ -143,6 +144,7 @@ =head1 SYNOPSIS
my $bVmForce = false;
my $bNoLint = false;
my $bBuildOnly = false;
my $iBuildMax = 4;
my $bCoverageOnly = false;
my $bNoCoverage = false;
my $bCOnly = false;
@@ -186,6 +188,7 @@ =head1 SYNOPSIS
'log-force' => \$bLogForce,
'no-lint' => \$bNoLint,
'build-only' => \$bBuildOnly,
'build-max=s' => \$iBuildMax,
'no-package' => \$bNoPackage,
'no-ci-config' => \$bNoCiConfig,
'coverage-only' => \$bCoverageOnly,
@@ -821,8 +824,8 @@ =head1 SYNOPSIS
executeTest(
'docker exec -i test-build' .
(vmLintC($strVm) && !$bNoLint ? ' scan-build-6.0' : '') .
" make --silent --directory ${strBuildPath} CEXTRA='${strCExtra}' LDEXTRA='${strLdExtra}'" .
" CDEBUG='${strCDebug}'",
" make -j ${iBuildMax} --silent --directory ${strBuildPath} CEXTRA='${strCExtra}'" .
" LDEXTRA='${strLdExtra}' CDEBUG='${strCDebug}'",
{bShowOutputAsync => $bLogDetail});

executeTest("docker rm -f test-build");
@@ -924,7 +927,7 @@ =head1 SYNOPSIS

executeTest(
($bContainerExists ? 'docker exec -i test-build ' : '') .
"make --silent --directory ${strBuildPath}",
"make -j ${iBuildMax} --silent --directory ${strBuildPath}",
{bShowOutputAsync => $bLogDetail});

if ($bContainerExists)
@@ -1230,8 +1233,9 @@ =head1 SYNOPSIS
{
my $oJob = new pgBackRestTest::Common::JobTest(
$oStorageTest, $strBackRestBase, $strTestPath, $strCoveragePath, $$oyTestRun[$iTestIdx], $bDryRun, $bVmOut,
$iVmIdx, $iVmMax, $iTestIdx, $iTestMax, $strLogLevel, $strLogLevelTest, $bLogForce, $bShowOutputAsync, $bNoCleanup, $iRetry,
!$bNoValgrind, !$bNoCoverage, !$bNoOptimize, $bBackTrace, $bProfile, !$bNoDebug, $bDebugTestTrace);
$iVmIdx, $iVmMax, $iTestIdx, $iTestMax, $strLogLevel, $strLogLevelTest, $bLogForce, $bShowOutputAsync,
$bNoCleanup, $iRetry, !$bNoValgrind, !$bNoCoverage, !$bNoOptimize, $bBackTrace, $bProfile, !$bNoDebug,
$bDebugTestTrace, $iBuildMax / $iVmMax < 1 ? 1 : int($iBuildMax / $iVmMax));
$iTestIdx++;

if ($oJob->run())

0 comments on commit 1ae8a6a

Please sign in to comment.
You can’t perform that action at this time.