Skip to content

Commit c24d096

Browse files
cmake --build . --target lcov-genhtml must be run from cmake-build folder
1 parent 15477c6 commit c24d096

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/generate-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
-DDPCTL_GENERATE_COVERAGE=ON \
9797
-DDPCTL_BUILD_CAPI_TESTS=ON \
9898
-DDPCTL_COVERAGE_REPORT_OUTPUT_DIR=$(pwd)
99-
pushd $(find _skbuild -name tests)
99+
pushd $(find _skbuild -name cmake-build)
100100
cmake --build . --target lcov-genhtml || exit 1
101101
popd
102102
export PATH=${_SAVED_PATH}

scripts/gen_coverage.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,16 @@ def run(
7373
if gtest_config:
7474
cmake_args += ["-DCMAKE_PREFIX_PATH=" + gtest_config]
7575
subprocess.check_call(cmake_args, shell=False, cwd=setup_dir, env=env)
76+
cmake_build_dir = (
77+
subprocess.check_output(
78+
["find", "_skbuild", "-name", "cmake-build"], cwd=setup_dir
79+
)
80+
.decode("utf-8")
81+
.strip("\n")
82+
)
7683
subprocess.check_call(
77-
["cmake", "--build", ".", "--target", "lcov-genhtml"], cwd=setup_dir
84+
["cmake", "--build", ".", "--target", "lcov-genhtml"],
85+
cwd=cmake_build_dir,
7886
)
7987
subprocess.check_call(
8088
[

0 commit comments

Comments
 (0)