[PATCH] D154280: [LIT] Added an option to llvm-lit to emit the necessary test coverage data, divided per test case
Shivam Gupta via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 20 07:30:56 PDT 2023
xgupta added a comment.
Hi,
writing test case in llvm/utils/lit/tests seems difficult, as when we are run there is no .script file generated as in case with llvm or clang test cases. So the patch is not working there and the env variable is not setting. I am thinking if we can submit in this way without testcase since lit code is very stable so chances of breaking something is less.
shivam at linux ~/.llvm/llvm-upstream/build (arcpatch-D154280) $ bin/llvm-lit -a -v --per-test-coverage ../clang/test/SemaCXX/bool.cpp
llvm-lit: /home/shivam/.llvm/llvm-upstream/llvm/utils/lit/lit/llvm/config.py:484: note: using clang: /home/shivam/.llvm/llvm-upstream/build/bin/clang
-- Testing: 1 tests, 1 workers --
PASS: Clang :: SemaCXX/bool.cpp (1 of 1)
Script:
--
export LLVM_PROFILE_FILE=bool0.profraw && : 'RUN: at line 1'; /home/shivam/.llvm/llvm-upstream/build/bin/clang -cc1 -internal-isystem /home/shivam/.llvm/llvm-upstream/build/lib/clang/17/include -nostdsysteminc -std=c++14 -fsyntax-only -verify=expected,precxx17 -Wno-constant-conversion /home/shivam/.llvm/llvm-upstream/clang/test/SemaCXX/bool.cpp
export LLVM_PROFILE_FILE=bool1.profraw && : 'RUN: at line 2'; /home/shivam/.llvm/llvm-upstream/build/bin/clang -cc1 -internal-isystem /home/shivam/.llvm/llvm-upstream/build/lib/clang/17/include -nostdsysteminc -std=c++14 -fsyntax-only -verify=expected,precxx17 -Wno-constant-conversion -Wno-deprecated -Wdeprecated-increment-bool /home/shivam/.llvm/llvm-upstream/clang/test/SemaCXX/bool.cpp
export LLVM_PROFILE_FILE=bool2.profraw && : 'RUN: at line 3'; /home/shivam/.llvm/llvm-upstream/build/bin/clang -cc1 -internal-isystem /home/shivam/.llvm/llvm-upstream/build/lib/clang/17/include -nostdsysteminc -std=c++2b -fsyntax-only -verify=expected,cxx17 -Wno-constant-conversion -Wno-deprecated -Wdeprecated-increment-bool /home/shivam/.llvm/llvm-upstream/clang/test/SemaCXX/bool.cpp
--
Exit Code: 0
********************
Testing Time: 0.76s
Passed: 1
shivam at linux ~/.llvm/llvm-upstream/build (arcpatch-D154280) $ find . -type f -name "*.profraw" | grep -i "profraw"
./default.profraw
./tools/clang/test/SemaCXX/bool1.profraw
./tools/clang/test/SemaCXX/bool0.profraw
./tools/clang/test/SemaCXX/bool2.profraw
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154280/new/
https://reviews.llvm.org/D154280
More information about the llvm-commits
mailing list