mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-22 05:08:58 +02:00
Allow the make command to be configured for test.pl.
This commit is contained in:
parent
aafd2f528d
commit
04e84da0ef
@ -61,6 +61,7 @@ sub new
|
|||||||
$self->{bVmOut},
|
$self->{bVmOut},
|
||||||
$self->{iVmIdx},
|
$self->{iVmIdx},
|
||||||
$self->{iVmMax},
|
$self->{iVmMax},
|
||||||
|
$self->{strMakeCmd},
|
||||||
$self->{iTestIdx},
|
$self->{iTestIdx},
|
||||||
$self->{iTestMax},
|
$self->{iTestMax},
|
||||||
$self->{strLogLevel},
|
$self->{strLogLevel},
|
||||||
@ -95,6 +96,7 @@ sub new
|
|||||||
{name => 'bVmOut'},
|
{name => 'bVmOut'},
|
||||||
{name => 'iVmIdx'},
|
{name => 'iVmIdx'},
|
||||||
{name => 'iVmMax'},
|
{name => 'iVmMax'},
|
||||||
|
{name => 'strMakeCmd'},
|
||||||
{name => 'iTestIdx'},
|
{name => 'iTestIdx'},
|
||||||
{name => 'iTestMax'},
|
{name => 'iTestMax'},
|
||||||
{name => 'strLogLevel'},
|
{name => 'strLogLevel'},
|
||||||
@ -261,7 +263,7 @@ sub run
|
|||||||
"cd $self->{strGCovPath} && " .
|
"cd $self->{strGCovPath} && " .
|
||||||
# Remove coverage data from last run
|
# Remove coverage data from last run
|
||||||
"rm -f test.gcda && " .
|
"rm -f test.gcda && " .
|
||||||
"make -j $self->{iBuildMax} -s 2>&1 &&" .
|
$self->{strMakeCmd} . " -j $self->{iBuildMax} -s 2>&1 &&" .
|
||||||
# Test with valgrind when requested
|
# Test with valgrind when requested
|
||||||
($self->{bValgrindUnit} && $self->{oTest}->{&TEST_TYPE} ne TESTDEF_PERFORMANCE ?
|
($self->{bValgrindUnit} && $self->{oTest}->{&TEST_TYPE} ne TESTDEF_PERFORMANCE ?
|
||||||
' valgrind -q --gen-suppressions=all ' .
|
' valgrind -q --gen-suppressions=all ' .
|
||||||
|
@ -113,6 +113,7 @@ test.pl [options]
|
|||||||
--log-level-test log level to use for C tests (defaults to OFF)
|
--log-level-test log level to use for C tests (defaults to OFF)
|
||||||
--log-level-test-file log level to use for file logging in integration tests (defaults to TRACE)
|
--log-level-test-file log level to use for file logging in integration tests (defaults to TRACE)
|
||||||
--no-log-timestamp suppress timestamps, timings, etc. Used to generate documentation.
|
--no-log-timestamp suppress timestamps, timings, etc. Used to generate documentation.
|
||||||
|
--make-cmd gnu-compatible make command (defaults to make)
|
||||||
--quiet, -q equivalent to --log-level=off
|
--quiet, -q equivalent to --log-level=off
|
||||||
|
|
||||||
VM Options:
|
VM Options:
|
||||||
@ -146,6 +147,7 @@ my $bDryRun = false;
|
|||||||
my $bNoCleanup = false;
|
my $bNoCleanup = false;
|
||||||
my $strPgSqlBin;
|
my $strPgSqlBin;
|
||||||
my $strTestPath;
|
my $strTestPath;
|
||||||
|
my $strMakeCmd = 'make';
|
||||||
my $bVersion = false;
|
my $bVersion = false;
|
||||||
my $bHelp = false;
|
my $bHelp = false;
|
||||||
my $bQuiet = false;
|
my $bQuiet = false;
|
||||||
@ -191,6 +193,7 @@ GetOptions ('q|quiet' => \$bQuiet,
|
|||||||
'clean-only' => \$bCleanOnly,
|
'clean-only' => \$bCleanOnly,
|
||||||
'pgsql-bin=s' => \$strPgSqlBin,
|
'pgsql-bin=s' => \$strPgSqlBin,
|
||||||
'test-path=s' => \$strTestPath,
|
'test-path=s' => \$strTestPath,
|
||||||
|
'make-cmd=s' => \$strMakeCmd,
|
||||||
'log-level=s' => \$strLogLevel,
|
'log-level=s' => \$strLogLevel,
|
||||||
'log-level-test=s' => \$strLogLevelTest,
|
'log-level-test=s' => \$strLogLevelTest,
|
||||||
'log-level-test-file=s' => \$strLogLevelTestFile,
|
'log-level-test-file=s' => \$strLogLevelTestFile,
|
||||||
@ -798,7 +801,7 @@ eval
|
|||||||
|
|
||||||
executeTest(
|
executeTest(
|
||||||
($strBuildVM ne VM_NONE ? 'docker exec -i -u ' . TEST_USER . ' test-build ' : '') .
|
($strBuildVM ne VM_NONE ? 'docker exec -i -u ' . TEST_USER . ' test-build ' : '') .
|
||||||
"make -j ${iBuildMax}" . ($bLogDetail ? '' : ' --silent') .
|
"${strMakeCmd} -j ${iBuildMax}" . ($bLogDetail ? '' : ' --silent') .
|
||||||
" --directory ${strBuildPath} CFLAGS='${strCFlags}' LDFLAGS='${strLdFlags}'",
|
" --directory ${strBuildPath} CFLAGS='${strCFlags}' LDFLAGS='${strLdFlags}'",
|
||||||
{bShowOutputAsync => $bLogDetail});
|
{bShowOutputAsync => $bLogDetail});
|
||||||
|
|
||||||
@ -1100,7 +1103,7 @@ eval
|
|||||||
{
|
{
|
||||||
my $oJob = new pgBackRestTest::Common::JobTest(
|
my $oJob = new pgBackRestTest::Common::JobTest(
|
||||||
$oStorageTest, $strBackRestBase, $strTestPath, $$oyTestRun[$iTestIdx], $bDryRun, $strVmHost, $bVmOut,
|
$oStorageTest, $strBackRestBase, $strTestPath, $$oyTestRun[$iTestIdx], $bDryRun, $strVmHost, $bVmOut,
|
||||||
$iVmIdx, $iVmMax, $iTestIdx, $iTestMax, $strLogLevel, $strLogLevelTest, $strLogLevelTestFile,
|
$iVmIdx, $iVmMax, $strMakeCmd, $iTestIdx, $iTestMax, $strLogLevel, $strLogLevelTest, $strLogLevelTestFile,
|
||||||
!$bNoLogTimestamp, $bLogForce, $bShowOutputAsync, $bNoCleanup, $iRetry, !$bNoValgrind, !$bNoCoverage,
|
!$bNoLogTimestamp, $bLogForce, $bShowOutputAsync, $bNoCleanup, $iRetry, !$bNoValgrind, !$bNoCoverage,
|
||||||
$bCoverageSummary, !$bNoOptimize, $bBackTrace, $bProfile, $iScale, $strTimeZone, !$bNoDebug,
|
$bCoverageSummary, !$bNoOptimize, $bBackTrace, $bProfile, $iScale, $strTimeZone, !$bNoDebug,
|
||||||
$bDebugTestTrace, $iBuildMax / $iVmMax < 1 ? 1 : int($iBuildMax / $iVmMax));
|
$bDebugTestTrace, $iBuildMax / $iVmMax < 1 ? 1 : int($iBuildMax / $iVmMax));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user