-
Notifications
You must be signed in to change notification settings - Fork 30
Improve coverage #818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve coverage #818
Conversation
llvm-cov is able to generate coverage for code in shared object library so long of object files used to link it are passed with -object argument to `llvm-cov report`. These arguments are generated using CMake generator expression, specifically TARGET_OBJECTS:DPCTLSyclInterface.
…m quick start guide
Decoupled llvm-genhtml and llvm-cov targets. Used object files in llvm-genhtml as it was done in llvm-cov target.
…test Modified workflow to use the script
View rendered docs @ https://intelpython.github.io/dpctl/pulls/818/index.html |
@oleksandr-pavlyk do you see any cases for |
1. Uses oneAPI python scripts/build_locally.py python scripts/build_locally.py --oneapi # this still worsk 2. Use non-standard oneAPI installation # compiler_root/bin/ and compiler_root/bin-llvm should exist python scripts/build_locally --compiler-root=/path/to/compiler_root 3. Use open-source bundle python scripts/build_locally --c-compiler=clang --cxx-compiler=clang++ --compiler_root=/path/to/dpcpp_compiler
ce3fbe7
to
c545ef4
Compare
Convert two .lcov files from different runs into 2 json files, combine them in Python and then use coveralls to merge the combined result with coverage data and upload
c545ef4
to
8506332
Compare
Also removed setting of DPCTL_ENABLE_L0_PROGRAM_CREATION to default value of ON.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plan worked! All the other CMake clean ups are good. Most exciting is that we could boost libsyclinterface coverage using the Python package tests.
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
This PR changes generation of coverage of libDPCTLSyclInterface, building ctest executable and linking it against the library, as opposed to recompiling all the library together with test files into one executable.
Thanks to @diptorupd insight on how to generate coverage for code from shared object, it becomes possible to measure coverage of the DPCTLSyclInterface library generated by calls from Python API, specifically exercised by pytest.