Skip to content

Commit 47a3f53

Browse files
committed
Add ProxyLib to Coverage
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
1 parent ebda02e commit 47a3f53

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.github/workflows/pr_push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,5 @@ jobs:
111111
needs: [Build]
112112
uses: ./.github/workflows/multi_numa.yml
113113
Coverage:
114-
needs: [Build, DevDax, GPU, MultiNuma, Qemu]
114+
needs: [Build, DevDax, GPU, MultiNuma, Qemu, ProxyLib]
115115
uses: ./.github/workflows/coverage.yml

.github/workflows/proxy_lib.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ permissions:
99
env:
1010
BUILD_DIR : "${{github.workspace}}/build"
1111
INSTL_DIR : "${{github.workspace}}/../install-dir"
12+
COVERAGE_DIR : "${{github.workspace}}/coverage"
13+
COVERAGE_NAME : "exports-coverage-proxy"
1214

1315
jobs:
1416
proxy-ubuntu:
@@ -30,7 +32,7 @@ jobs:
3032
- name: Install apt packages
3133
run: |
3234
sudo apt-get update
33-
sudo apt-get install -y cmake libhwloc-dev libjemalloc-dev libtbb-dev
35+
sudo apt-get install -y cmake libhwloc-dev libjemalloc-dev libtbb-dev lcov
3436
3537
- name: Set ptrace value for IPC test
3638
run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
@@ -52,6 +54,7 @@ jobs:
5254
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
5355
-DUMF_TESTS_FAIL_ON_SKIP=ON
5456
-DUMF_PROXY_LIB_BASED_ON_POOL=${{matrix.proxy_lib_pool}}
57+
${{ matrix.build_type == 'Debug' && '-DUMF_USE_COVERAGE=ON' || '' }}
5558
5659
- name: Build UMF
5760
run: cmake --build ${{env.BUILD_DIR}} -j $(nproc)
@@ -71,3 +74,19 @@ jobs:
7174
- name: Run "/usr/bin/date" with proxy library
7275
working-directory: ${{env.BUILD_DIR}}
7376
run: UMF_PROXY="page.disposition=shared-shm" LD_PRELOAD=./lib/libumf_proxy.so /usr/bin/date
77+
78+
- name: Check coverage
79+
if: ${{ matrix.build_type == 'Debug' }}
80+
working-directory: ${{env.BUILD_DIR}}
81+
run: |
82+
export COVERAGE_FILE_NAME=${{env.COVERAGE_NAME}}-proxy_lib_pool-${{matrix.proxy_lib_pool}}
83+
echo "COVERAGE_FILE_NAME: $COVERAGE_FILE_NAME"
84+
../scripts/coverage/coverage_capture.sh $COVERAGE_FILE_NAME
85+
mkdir -p ${{env.COVERAGE_DIR}}
86+
mv ./$COVERAGE_FILE_NAME ${{env.COVERAGE_DIR}}
87+
88+
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
89+
if: ${{ matrix.build_type == 'Debug' }}
90+
with:
91+
name: ${{env.COVERAGE_NAME}}-proxy_lib_pool-${{matrix.proxy_lib_pool}}
92+
path: ${{env.COVERAGE_DIR}}

0 commit comments

Comments
 (0)