1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-05-22 10:15:16 +02:00

Add --no-back-trace option to test.pl.

Running valgrind and backtrace together has been causing tests to timeout in CI, mostly likely due to limited resources. This has not been a problem in normal development environments.

Since it is still important to run backtraces for debugging, split the u22 test that was doing all this work to run coverage and backtrace together and valgrind-only as a separate test. As a bonus these tests run faster separately and since they run in parallel the total execution time is faster.
This commit is contained in:
David Steele
2023-01-28 18:55:53 +07:00
parent 16c625353d
commit a28f3d49c2
11 changed files with 80 additions and 23 deletions
+6 -2
View File
@@ -80,6 +80,7 @@ test.pl [options]
--min-gen only run required code generation
--gen-check check that auto-generated files are correct (used in CI to detect changes)
--code-count generate code counts
--no-back-trace don't run backrace on C unit tests (may be slow with valgrind)
--no-valgrind don't run valgrind on C unit tests (saves time)
--no-coverage don't run coverage on C unit tests (saves time)
--no-coverage-report run coverage but don't generate coverage report (saves time)
@@ -158,6 +159,7 @@ my $bGenCheck = false;
my $bMinGen = false;
my $bCodeCount = false;
my $bProfile = false;
my $bNoBackTrace = false;
my $bNoValgrind = false;
my $bNoOptimize = false;
my $bNoDebug = false;
@@ -207,6 +209,7 @@ GetOptions ('q|quiet' => \$bQuiet,
'min-gen' => \$bMinGen,
'code-count' => \$bCodeCount,
'profile' => \$bProfile,
'no-back-trace' => \$bNoBackTrace,
'no-valgrind' => \$bNoValgrind,
'no-optimize' => \$bNoOptimize,
'no-debug', => \$bNoDebug,
@@ -266,6 +269,7 @@ eval
################################################################################################################################
if ($bProfile)
{
$bNoBackTrace = true;
$bNoValgrind = true;
$bNoCoverage = true;
}
@@ -1054,8 +1058,8 @@ eval
my $oJob = new pgBackRestTest::Common::JobTest(
$oStorageTest, $strBackRestBase, $strTestPath, $$oyTestRun[$iTestIdx], $bDryRun, $bVmOut, $iVmIdx, $iVmMax,
$strMakeCmd, $iTestIdx, $iTestMax, $strLogLevel, $strLogLevelTest, $strLogLevelTestFile, !$bNoLogTimestamp,
$bShowOutputAsync, $bNoCleanup, $iRetry, !$bNoValgrind, !$bNoCoverage, $bCoverageSummary, !$bNoOptimize,
$bProfile, $iScale, $strTimeZone, !$bNoDebug, $bDebugTestTrace,
$bShowOutputAsync, $bNoCleanup, $iRetry, !$bNoBackTrace, !$bNoValgrind, !$bNoCoverage, $bCoverageSummary,
!$bNoOptimize, $bProfile, $iScale, $strTimeZone, !$bNoDebug, $bDebugTestTrace,
$iBuildMax / $iVmMax < 1 ? 1 : int($iBuildMax / $iVmMax));
$iTestIdx++;