mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-30 05:39:12 +02:00
Designate a single distro (Ubuntu 16.04) for C coverage testing
Enable optimizations on the distros that don't do coverage testing.
This commit is contained in:
parent
deae0b8cd7
commit
8ccfaa9ad3
@ -131,7 +131,7 @@
|
||||
</release-item>
|
||||
|
||||
<release-item>
|
||||
<p>Designate a single distro (Ubuntu 16.04) for Perl coverage testing. Running coverage testing on multiple distros takes time but doesn't add significant value. Also ensure that the distro designated to run coverage tests is one of the default test distros.</p>
|
||||
<p>Designate a single distro (Ubuntu 16.04) for coverage testing. Running coverage testing on multiple distros takes time but doesn't add significant value. Also ensure that the distro designated to run coverage tests is one of the default test distros. For C tests, enable optimizations on the distros that don't do coverage testing.</p>
|
||||
</release-item>
|
||||
|
||||
<release-item>
|
||||
|
@ -315,11 +315,12 @@ sub run
|
||||
$self->{oStorageTest}->put("$self->{strGCovPath}/test.c", $strTestC);
|
||||
|
||||
my $strGccCommand =
|
||||
'gcc -std=c99 -fprofile-arcs -ftest-coverage -fPIC -O0 ' .
|
||||
'-Wfatal-errors -Wall -Wextra -Wwrite-strings -Wno-clobbered ' .
|
||||
($self->{oTest}->{&TEST_VM} ne VM_CO6 && $self->{oTest}->{&TEST_VM} ne VM_U12 ? '-Wpedantic ' : '') .
|
||||
"-I/$self->{strBackRestBase}/src -I/$self->{strBackRestBase}/test/src test.c " .
|
||||
"/$self->{strBackRestBase}/test/src/common/harnessTest.c " .
|
||||
'gcc -std=c99 -fPIC' .
|
||||
(vmCoverage($self->{oTest}->{&TEST_VM}) ? ' -fprofile-arcs -ftest-coverage -O0' : ' -O2') .
|
||||
' -Werror -Wfatal-errors -Wall -Wextra -Wwrite-strings -Wno-clobbered' .
|
||||
($self->{oTest}->{&TEST_VM} ne VM_CO6 && $self->{oTest}->{&TEST_VM} ne VM_U12 ? ' -Wpedantic ' : '') .
|
||||
" -I/$self->{strBackRestBase}/src -I/$self->{strBackRestBase}/test/src test.c" .
|
||||
" /$self->{strBackRestBase}/test/src/common/harnessTest.c " .
|
||||
join(' ', @stryCFile) . " -l crypto -o test";
|
||||
|
||||
executeTest(
|
||||
@ -355,7 +356,6 @@ sub run
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
####################################################################################################################################
|
||||
# end
|
||||
####################################################################################################################################
|
||||
@ -386,7 +386,7 @@ sub end
|
||||
}
|
||||
|
||||
# If C library generate coverage info
|
||||
if ($iExitStatus == 0 && $self->{oTest}->{&TEST_C})
|
||||
if ($iExitStatus == 0 && $self->{oTest}->{&TEST_C} && vmCoverage($self->{oTest}->{&TEST_VM}))
|
||||
{
|
||||
# Generate a list of files to cover
|
||||
my $hTestCoverage =
|
||||
|
Loading…
x
Reference in New Issue
Block a user