You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-05 00:28:52 +02:00
Build command and configuration reference in C.
Migrate generation of these files from help.xml to the intermediate documentation format. This allows us to share a lot of code that is already in C and remove duplicated code in Perl. More duplicate code can be removed in Perl once man generation is migrated. Also update the unit test harness to allow testing of modules in the doc directory.
This commit is contained in:
@ -129,6 +129,10 @@ sub coverageExtract
|
||||
{
|
||||
$strModuleName =~ s/^test/src/mg;
|
||||
}
|
||||
elsif ($strModuleName =~ /^doc/mg)
|
||||
{
|
||||
$strModuleName =~ s/^doc/doc\/src/mg;
|
||||
}
|
||||
|
||||
my $strModuleOutName = $strModuleName;
|
||||
my $bTest = false;
|
||||
@ -150,6 +154,10 @@ sub coverageExtract
|
||||
{
|
||||
$strModulePath .= 'test/src/module/' . substr(${strModuleOutName}, 5);
|
||||
}
|
||||
elsif (${strModuleOutName} =~ /^doc\//)
|
||||
{
|
||||
$strModulePath .= "${strModuleOutName}";
|
||||
}
|
||||
else
|
||||
{
|
||||
$strModulePath .= "src/${strModuleOutName}";
|
||||
@ -161,7 +169,7 @@ sub coverageExtract
|
||||
my $strModuleSourceFile = $strModulePath . '.c' . ($bInc ? '.inc' : '');
|
||||
|
||||
executeTest(
|
||||
"${strLCovExe}" . ($bTest ? ' --rc lcov_branch_coverage=0' : '') . " --extract=${strLCovOut} */${strModuleName}.c" .
|
||||
"${strLCovExe}" . ($bTest ? ' --rc lcov_branch_coverage=0' : '') . " --extract=${strLCovOut} *${strModuleName}.c" .
|
||||
($bInc ? '.inc' : '') . " --o=${strLCovOutTmp}");
|
||||
|
||||
# Combine with prior run if there was one
|
||||
@ -315,6 +323,7 @@ sub coverageValidateAndGenerate
|
||||
{
|
||||
my $strCoverageFile = $strCodeModule;
|
||||
$strCoverageFile =~ s/^test/src/mg;
|
||||
$strCoverageFile =~ s/^doc/doc\/src/mg;
|
||||
$strCoverageFile =~ s/^module/test/mg;
|
||||
$strCoverageFile = "${strTestResultCoveragePath}/raw/${strCoverageFile}.lcov";
|
||||
|
||||
|
Reference in New Issue
Block a user