diff options
author | Fangrui Song <i@maskray.me> | 2023-05-17 11:54:38 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2023-05-17 11:54:38 -0700 |
commit | 0f9f2473613519b18004158835914bc25fcb2b40 (patch) | |
tree | ea067b1a3268eb34e180c147bf1fe372ab1684ef /compiler-rt/test/profile/gcov-basic.c | |
parent | da42b2846c82063bd1bce78d6a046f78f218eb72 (diff) | |
download | llvm-0f9f2473613519b18004158835914bc25fcb2b40.tar.gz |
[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.
Diffstat (limited to 'compiler-rt/test/profile/gcov-basic.c')
-rw-r--r-- | compiler-rt/test/profile/gcov-basic.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler-rt/test/profile/gcov-basic.c b/compiler-rt/test/profile/gcov-basic.c index 0d8be6d7de08..a44ffd7f61fa 100644 --- a/compiler-rt/test/profile/gcov-basic.c +++ b/compiler-rt/test/profile/gcov-basic.c @@ -1,27 +1,27 @@ // RUN: mkdir -p %t.dir && cd %t.dir /// gcov 3.4 redesigned the format and changed the extension from .da to .gcda -// RUN: %clang --coverage -Xclang -coverage-version='304*' %s -o %t +// RUN: %clang --coverage -Xclang -coverage-version='304*' %s -o %t -dumpdir ./ // RUN: rm -f gcov-basic.gcda && %run %t && %run %t a // RUN: llvm-cov gcov -t gcov-basic.gcno | FileCheck %s /// r173147: split checksum into cfg checksum and line checksum. -// RUN: %clang --coverage -Xclang -coverage-version='407*' %s -o %t +// RUN: %clang --coverage -Xclang -coverage-version='407*' %s -o %t -dumpdir ./ // RUN: rm -f gcov-basic.gcda && %run %t && %run %t a // RUN: llvm-cov gcov -t gcov-basic.gcno | FileCheck %s /// r189778: the exit block moved from the last to the second. -// RUN: %clang --coverage -Xclang -coverage-version='408*' %s -o %t +// RUN: %clang --coverage -Xclang -coverage-version='408*' %s -o %t -dumpdir ./ // RUN: rm -f gcov-basic.gcda && %run %t && %run %t a // RUN: llvm-cov gcov -t gcov-basic.gcno /// PR gcov-profile/48463 -// RUN: %clang --coverage -Xclang -coverage-version='800*' %s -o %t +// RUN: %clang --coverage -Xclang -coverage-version='800*' %s -o %t -dumpdir ./ // RUN: rm -f gcov-basic.gcda && %run %t && %run %t a // RUN: llvm-cov gcov -t gcov-basic.gcno /// PR gcov-profile/84846, r269678 -// RUN: %clang --coverage -Xclang -coverage-version='900*' %s -o %t +// RUN: %clang --coverage -Xclang -coverage-version='900*' %s -o %t -dumpdir ./ // RUN: rm -f gcov-basic.gcda && %run %t && %run %t a // RUN: llvm-cov gcov -t gcov-basic.gcno |