llvm-project/compiler-rt/test/profile/instrprof-gcov-multiple-bbs-single-line.test
Fangrui Song 0f9f247361 [gcov][test] Add -dumpdir ./
These tests rely on an unintended behavior that when the driver performs both
compilation and linking phases, the .gcno & .gcda files are placed in PWD. The
behavior will be fixed to respect -o (match -ftime-trace, -gsplit-dwarf, and
GCC).

Add -dumpdir ./ so that the tests will work with or without the behavior change,
and make it easy to compare the coverage behavior with GCC.
2023-05-17 11:54:38 -07:00

12 lines
548 B
Plaintext

RUN: mkdir -p %t.d
RUN: cd %t.d
RUN: %clang --coverage -o %t %S/Inputs/instrprof-gcov-multiple-bbs-single-line.c -dumpdir ./
RUN: test -f instrprof-gcov-multiple-bbs-single-line.gcno
RUN: rm -f instrprof-gcov-multiple-bbs-single-line.gcda
RUN: %run %t
RUN: llvm-cov gcov -b -c instrprof-gcov-multiple-bbs-single-line.gcda
RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-gcov-multiple-bbs-single-line.c.gcov %S/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov
RUN: rm instrprof-gcov-multiple-bbs-single-line.gcda