From 782c9f89f47fcb8bac75b21c241c1f34d744c13c Mon Sep 17 00:00:00 2001 From: David Steele Date: Fri, 20 Mar 2020 13:43:08 -0400 Subject: [PATCH] Remove old coverage data before starting new test. The old coverage data has been recorded so it is no longer needed. In newer versions of gcc leaving this file around can lead to an error when writing profile data after forking off to a non-pgbackrest binary (which we do in some unit tests). --- test/lib/pgBackRestTest/Common/JobTest.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/lib/pgBackRestTest/Common/JobTest.pm b/test/lib/pgBackRestTest/Common/JobTest.pm index d108b4e5d..5d7b2e528 100644 --- a/test/lib/pgBackRestTest/Common/JobTest.pm +++ b/test/lib/pgBackRestTest/Common/JobTest.pm @@ -254,6 +254,8 @@ sub run ($self->{oTest}->{&TEST_VM} ne VM_NONE ? 'docker exec -i -u ' . TEST_USER . " ${strImage} " : '') . "bash -l -c '" . "cd $self->{strGCovPath} && " . + # Remove coverage data from last run + "rm -f test.gcda && " . "make -j $self->{iBuildMax} -s 2>&1 &&" . ($self->{oTest}->{&TEST_VM} ne VM_CO6 && $self->{bValgrindUnit} && $self->{oTest}->{&TEST_TYPE} ne TESTDEF_PERFORMANCE ?