summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/profile/instrprof-shared-gcov-flush.test
diff options
context:
space:
mode:
authorCalixte Denizet <cdenizet@mozilla.com>2018-09-25 11:12:15 +0000
committerCalixte Denizet <cdenizet@mozilla.com>2018-09-25 11:12:15 +0000
commitcb4cd5ccdcee4c126992fe3e6fc1ddbe241073e9 (patch)
treec458bdbd302424eefcae082d1e666f4a196ffd77 /compiler-rt/test/profile/instrprof-shared-gcov-flush.test
parent57ddec0dd198c91dbeef8553c0feeb734e925ae4 (diff)
downloadbcm5719-llvm-cb4cd5ccdcee4c126992fe3e6fc1ddbe241073e9.tar.gz
bcm5719-llvm-cb4cd5ccdcee4c126992fe3e6fc1ddbe241073e9.zip
[Profile] Fix gcov tests
Summary: The gcda need to be delete before running the binary to avoid to have an increasing "# of Runs" when a test is failing Reviewers: vitalybuka, eugenis, marco-c Reviewed By: marco-c Subscribers: delcypher, llvm-commits, #sanitizers, sylvestre.ledru, marco-c Differential Revision: https://reviews.llvm.org/D52456 llvm-svn: 342963
Diffstat (limited to 'compiler-rt/test/profile/instrprof-shared-gcov-flush.test')
-rw-r--r--compiler-rt/test/profile/instrprof-shared-gcov-flush.test8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/test/profile/instrprof-shared-gcov-flush.test b/compiler-rt/test/profile/instrprof-shared-gcov-flush.test
index 50292b6336c..542db041243 100644
--- a/compiler-rt/test/profile/instrprof-shared-gcov-flush.test
+++ b/compiler-rt/test/profile/instrprof-shared-gcov-flush.test
@@ -11,42 +11,42 @@ RUN: test -f instrprof-shared-lib.gcno
RUN: %clang -DEXIT_ABRUPTLY -DSHARED_CALL_BEFORE_GCOV_FLUSH -DSHARED_CALL_AFTER_GCOV_FLUSH --coverage -o %t -L%t.d -rpath %t.d -lfunc %S/Inputs/instrprof-shared-main-gcov-flush.c
RUN: test -f instrprof-shared-main-gcov-flush.gcno
+RUN: rm -f instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda
RUN: %run %t
RUN: llvm-cov gcov instrprof-shared-main-gcov-flush.gcda
RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-main-gcov-flush.c.gcov %S/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov
RUN: llvm-cov gcov instrprof-shared-lib.gcda
RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-lib.c.gcov %S/Inputs/instrprof-shared-lib.c.gcov
-RUN: rm instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda
# Test the case where we exit normally and we have a call to the shared library function before __gcov_flush.
RUN: %clang -DSHARED_CALL_BEFORE_GCOV_FLUSH --coverage -o %t -L%t.d -rpath %t.d -lfunc %S/Inputs/instrprof-shared-main-gcov-flush.c
RUN: test -f instrprof-shared-main-gcov-flush.gcno
+RUN: rm -f instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda
RUN: %run %t
RUN: llvm-cov gcov instrprof-shared-main-gcov-flush.gcda
RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-main-gcov-flush.c.gcov %S/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov
RUN: llvm-cov gcov instrprof-shared-lib.gcda
RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-lib.c.gcov %S/Inputs/instrprof-shared-lib.c.gcov
-RUN: rm instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda
# Test the case where we exit normally and we have a call to the shared library function after __gcov_flush.
RUN: %clang -DSHARED_CALL_AFTER_GCOV_FLUSH --coverage -o %t -L%t.d -rpath %t.d -lfunc %S/Inputs/instrprof-shared-main-gcov-flush.c
RUN: test -f instrprof-shared-main-gcov-flush.gcno
+RUN: rm -f instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda
RUN: %run %t
RUN: llvm-cov gcov instrprof-shared-main-gcov-flush.gcda
RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-main-gcov-flush.c.gcov %S/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov
RUN: llvm-cov gcov instrprof-shared-lib.gcda
RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-lib.c.gcov %S/Inputs/instrprof-shared-lib.c.gcov
-RUN: rm instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda
# Test the case where we exit normally and we have calls to the shared library function before and after __gcov_flush.
RUN: %clang -DSHARED_CALL_BEFORE_GCOV_FLUSH -DSHARED_CALL_AFTER_GCOV_FLUSH --coverage -o %t -L%t.d -rpath %t.d -lfunc %S/Inputs/instrprof-shared-main-gcov-flush.c
RUN: test -f instrprof-shared-main-gcov-flush.gcno
+RUN: rm -f instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda
RUN: %run %t
RUN: llvm-cov gcov instrprof-shared-main-gcov-flush.gcda
RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-main-gcov-flush.c.gcov %S/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov
RUN: llvm-cov gcov instrprof-shared-lib.gcda
RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-shared-lib.c.gcov %S/Inputs/instrprof-shared-lib_called-twice.c.gcov
-RUN: rm instrprof-shared-main-gcov-flush.gcda instrprof-shared-lib.gcda
OpenPOWER on IntegriCloud