1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-12 10:04:14 +02:00

Move coverage results to test/result.

This commit is contained in:
David Steele 2020-03-14 15:29:42 -04:00
parent 75ff25f17f
commit 6827e248cd
2 changed files with 8 additions and 7 deletions

2
test/.gitignore vendored
View File

@ -6,8 +6,8 @@
/scratch*
# Exclude paths where test code writes results (eventually want to get this down to just result)
/coverage*
/result
# Obsolete result paths ignored so old results don't suddenly show up as new files
/coverage*
/profile

View File

@ -643,12 +643,13 @@ eval
$oStorageTest->pathCreate($strTestPath, {strMode => '0770', bIgnoreExists => true, bCreateParent => true});
# Remove old coverage dirs -- do it this way so the dirs stay open in finder/explorer, etc.
executeTest("rm -rf ${strBackRestBase}/test/coverage/c/*");
executeTest("rm -rf ${strBackRestBase}/test/result/coverage/lcov/*");
# Overwrite the C coverage report so it will load but not show old coverage
$oStorageTest->pathCreate("${strBackRestBase}/test/coverage", {strMode => '0770', bIgnoreExists => true});
$oStorageTest->pathCreate(
"${strBackRestBase}/test/result/coverage", {strMode => '0770', bIgnoreExists => true, bCreateParent => true});
$oStorageBackRest->put(
"${strBackRestBase}/test/coverage/c-coverage.html", "<center>[ Generating New Report ]</center>");
"${strBackRestBase}/test/result/coverage/coverage.html", "<center>[ Generating New Report ]</center>");
# Copy C code for coverage tests
if (vmCoverageC($strVm) && !$bDryRun)
@ -1192,7 +1193,7 @@ eval
executeTest(
"genhtml ${strLCovFile} --config-file=${strBackRestBase}/test/.vagrant/code/lcov.conf" .
" --prefix=${strBackRestBase}/test/.vagrant/code" .
" --output-directory=${strBackRestBase}/test/coverage/c");
" --output-directory=${strBackRestBase}/test/result/coverage/lcov");
foreach my $strCodeModule (sort(keys(%{$hCoverageActual})))
{
@ -1250,7 +1251,7 @@ eval
$oStorageBackRest->remove("${strBackRestBase}/test/.vagrant/code/all.lcov", {bIgnoreMissing => true});
coverageGenerate(
$oStorageBackRest, "${strBackRestBase}/test/.vagrant/code",
"${strBackRestBase}/test/coverage/c-coverage.html");
"${strBackRestBase}/test/result/coverage/coverage.html");
if ($bCoverageSummary)
{
@ -1263,7 +1264,7 @@ eval
}
else
{
executeTest("rm -rf ${strBackRestBase}/test/coverage/c");
executeTest("rm -rf ${strBackRestBase}/test/tesult/coverage");
}
}
}