-
Notifications
You must be signed in to change notification settings - Fork 288
Add test with bazel #969
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
Add test with bazel #969
Conversation
0725e49 to
f83f957
Compare
|
@oliverlee Do you have an idea why in the pipeline following error is showing? |
I'm not sure, it builds for me locally: |
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.
you may want to set USE_BAZEL_VERSION given use of bazelisk
https://github.com/bazelbuild/bazelisk?tab=readme-ov-file#bazeliskrc-configuration-file
otherwise, bazel version updates may break ci
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.
I had this at the beginning.
|
I was able to generate coverage with bazel and clang with this command: I was not able to generate coverage with bazel and gcc: config settings are defined by this I think the issue is related to the values of as the gcda file is created if I manually invoke the test target: I'm not sure if this is macOS specific behavior as I haven't had issues in the past with gcc 12 and x86-64-linux. |
|
I don't get it why the test is working locally with gcc and clang but on GH runners I get |
I'm not sure. Is this only running on gh runners provide bazelisk but I guess you can't or don't want to use that? |
|
In the Runner itself it‘s working but your right, on GH docker image I need to install another bazelisk than on my Mac. |
2094530 to
b6c0bb4
Compare
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
Ignore bazel files (added by symlink)
b6c0bb4 to
9f5bae5
Compare
|
@oliverlee Please can you check the example? I was able to add a example for Ubuntu but with clang the coverage command from Bazel will result in an error |
Add the .nox directories to the ignore globings.
|
I should have some time later today. |
|
The coverage command of Bazel is only working on Ubuntu. What's always working was running the executable on my own and then collecting the gcov files by gcovr. |
|
To run the test locally you can use: |
Okay it seems to pass locally, although I'm not sure how I would run this outside of nox |
|
Nox is a python module which sets up the environment to run the tests. You can run it without nox but then you need to do the setup yourself. |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
178c65f to
5b11500
Compare
e65af3c to
eb678c1
Compare
eb678c1 to
cd3b42a
Compare
Add a test case which is using bazel to build the SW and shows how this can be used together with gcovr.
Add test with bezel build system to verify #966.