From aa18ea96f07eb65936d6e79aed89164b3b05c47d Mon Sep 17 00:00:00 2001 From: shibu-kv Date: Wed, 5 Aug 2026 09:05:19 -0700 Subject: [PATCH 1/7] Fix the gaps in workflows to upload L1 test results to portal --- .github/workflows/L1-tests.yml | 15 +++++++++++++-- test/run_ut.sh | 3 +++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/L1-tests.yml b/.github/workflows/L1-tests.yml index 4777b646..b0c7f79e 100644 --- a/.github/workflows/L1-tests.yml +++ b/.github/workflows/L1-tests.yml @@ -39,16 +39,27 @@ jobs: docker cp native-platform:/tmp/Gtest_Report /tmp/Gtest_Report ls -l /tmp/Gtest_Report + - name: Upload test results as artifact + uses: actions/upload-artifact@v4 + with: + name: gtest-results + path: /tmp/Gtest_Report + retention-days: 1 + upload-test-results: name: Upload L1 test results to automatic test result management system needs: execute-L1-tests-on-pr runs-on: ubuntu-latest container: image: ghcr.io/rdkcentral/docker-rdk-ci:latest - volumes: - - /tmp/Gtest_Report:/tmp/Gtest_Report steps: + - name: Download test results + uses: actions/download-artifact@v4 + with: + name: gtest-results + path: /tmp/Gtest_Report + - name: Upload results if: github.repository_owner == 'rdkcentral' env: diff --git a/test/run_ut.sh b/test/run_ut.sh index 363bbb15..795b24a4 100755 --- a/test/run_ut.sh +++ b/test/run_ut.sh @@ -44,6 +44,9 @@ autoreconf --install make -C source/test +# Create test results directory +mkdir -p /tmp/Gtest_Report + # List of 13 test binaries to run tests=" ./source/test/bulkdata/profile_gtest.bin From f1667042d0e6c5482cca41ac3d60a4ba348a1d04 Mon Sep 17 00:00:00 2001 From: shibu-kv Date: Wed, 5 Aug 2026 09:22:45 -0700 Subject: [PATCH 2/7] Temp : Ammending branches for verification --- .github/workflows/L1-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/L1-tests.yml b/.github/workflows/L1-tests.yml index b0c7f79e..379381cc 100644 --- a/.github/workflows/L1-tests.yml +++ b/.github/workflows/L1-tests.yml @@ -2,7 +2,7 @@ name: L1 Unit Tests on: pull_request: - branches: [ develop ] + branches: [ develop, main , feature/L1-test-result-upload ] env: AUTOMATICS_UNAME: ${{ secrets.AUTOMATICS_UNAME }} From 0f85e4878e704652e729c96a606e52a4165bc3ed Mon Sep 17 00:00:00 2001 From: shibu-kv Date: Wed, 5 Aug 2026 09:37:42 -0700 Subject: [PATCH 3/7] Temp : Ammending branches for verification --- .github/workflows/code-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 5ad3ac07..b69bde0e 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -2,7 +2,7 @@ name: Code Coverage on: pull_request: - branches: [ main] + branches: [ develop, main, feature/L1-test-result-upload ] env: AUTOMATICS_UNAME: ${{ secrets.AUTOMATICS_UNAME }} From 89c48e0a9e4773b0ea9d55a86bab2b28f107438d Mon Sep 17 00:00:00 2001 From: shibu-kv Date: Wed, 5 Aug 2026 10:02:16 -0700 Subject: [PATCH 4/7] RDKEMW-23103: Fix the erros with deriving PR details The upload scripts were not running within the source checkout directory --- .github/workflows/L1-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/L1-tests.yml b/.github/workflows/L1-tests.yml index 379381cc..769d6fd3 100644 --- a/.github/workflows/L1-tests.yml +++ b/.github/workflows/L1-tests.yml @@ -54,6 +54,9 @@ jobs: image: ghcr.io/rdkcentral/docker-rdk-ci:latest steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Download test results uses: actions/download-artifact@v4 with: From 96d5ec02212a4cd16a031c03105edf1e823c4a7c Mon Sep 17 00:00:00 2001 From: shibu-kv Date: Wed, 5 Aug 2026 10:22:42 -0700 Subject: [PATCH 5/7] RDKEMW-23103: Remove duplicate L1 test execution in every develop PR Include posting coverage summary to every PR in develop --- .github/workflows/L1-tests.yml | 26 ++++++++++++++++++++++++-- .github/workflows/code-coverage.yml | 2 +- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/L1-tests.yml b/.github/workflows/L1-tests.yml index 769d6fd3..e2f8cb5e 100644 --- a/.github/workflows/L1-tests.yml +++ b/.github/workflows/L1-tests.yml @@ -31,14 +31,36 @@ jobs: run: | docker run -d --name native-platform -v ${{ github.workspace }}:/mnt/L1_CONTAINER_SHARED_VOLUME ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest - - name: Run L1 Unit Tests inside container - run: docker exec -i native-platform /bin/bash -c "cd /mnt/L1_CONTAINER_SHARED_VOLUME/ && sh test/run_ut.sh" + - name: Run L1 Unit Tests inside container with coverage flags enabled + run: docker exec -i native-platform /bin/bash -c "cd /mnt/L1_CONTAINER_SHARED_VOLUME/ && sh test/run_ut.sh --enable-cov && lcov --list coverage.info | grep 'Lines\|Total' > /tmp/coverage_summary.txt" + + - name: Copy coverage summary to runner + run: docker cp native-platform:/tmp/coverage_summary.txt /tmp/ - name: Copy L1 test results to runner run: | docker cp native-platform:/tmp/Gtest_Report /tmp/Gtest_Report ls -l /tmp/Gtest_Report + - name: Update the coverage report to Pull request using actions + uses: actions/github-script@v4 + with: + script: | + const fs = require('fs'); + const lcov_result = fs.readFileSync('/tmp/coverage_summary.txt', 'utf8'); + + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: + '## Code Coverage Summary \n' + + ' ' + + '```' + + lcov_result + + '```' + }); + - name: Upload test results as artifact uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index b69bde0e..824b6d50 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -2,7 +2,7 @@ name: Code Coverage on: pull_request: - branches: [ develop, main, feature/L1-test-result-upload ] + branches: [ main ] env: AUTOMATICS_UNAME: ${{ secrets.AUTOMATICS_UNAME }} From 7534a2bb2df9d2b61c16e464aed0d57143256c4f Mon Sep 17 00:00:00 2001 From: shibu-kv Date: Wed, 5 Aug 2026 10:26:24 -0700 Subject: [PATCH 6/7] Fix truncated coverage report summary to the PR --- .github/workflows/L1-tests.yml | 2 +- .github/workflows/code-coverage.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/L1-tests.yml b/.github/workflows/L1-tests.yml index e2f8cb5e..b67a1266 100644 --- a/.github/workflows/L1-tests.yml +++ b/.github/workflows/L1-tests.yml @@ -32,7 +32,7 @@ jobs: docker run -d --name native-platform -v ${{ github.workspace }}:/mnt/L1_CONTAINER_SHARED_VOLUME ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest - name: Run L1 Unit Tests inside container with coverage flags enabled - run: docker exec -i native-platform /bin/bash -c "cd /mnt/L1_CONTAINER_SHARED_VOLUME/ && sh test/run_ut.sh --enable-cov && lcov --list coverage.info | grep 'Lines\|Total' > /tmp/coverage_summary.txt" + run: docker exec -i native-platform /bin/bash -c "cd /mnt/L1_CONTAINER_SHARED_VOLUME/ && sh test/run_ut.sh --enable-cov && lcov --list coverage.info > /tmp/coverage_summary.txt" - name: Copy coverage summary to runner run: docker cp native-platform:/tmp/coverage_summary.txt /tmp/ diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 824b6d50..5d65271c 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -32,7 +32,7 @@ jobs: docker run -d --name native-platform -v ${{ github.workspace }}:/mnt/L1_CONTAINER_SHARED_VOLUME ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest - name: Run unit tests with coverage flags enabled and Caculate the code coverage summary - run: docker exec -i native-platform /bin/bash -c "cd /mnt/L1_CONTAINER_SHARED_VOLUME/ && sh test/run_ut.sh --enable-cov && lcov --list coverage.info | grep 'Lines\|Total' > /tmp/coverage_summary.txt" + run: docker exec -i native-platform /bin/bash -c "cd /mnt/L1_CONTAINER_SHARED_VOLUME/ && sh test/run_ut.sh --enable-cov && lcov --list coverage.info > /tmp/coverage_summary.txt" - name: Copy coverage summary to runner run: docker cp native-platform:/tmp/coverage_summary.txt /tmp/ From 632cf3de8e50cafd72ee5ab85b05db15b30552a0 Mon Sep 17 00:00:00 2001 From: shibu-kv Date: Wed, 5 Aug 2026 11:50:03 -0700 Subject: [PATCH 7/7] Limit the workflow back to develop Verified with the execution and limiting to develop based on results. --- .github/workflows/L1-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/L1-tests.yml b/.github/workflows/L1-tests.yml index b67a1266..139bcdc9 100644 --- a/.github/workflows/L1-tests.yml +++ b/.github/workflows/L1-tests.yml @@ -2,7 +2,7 @@ name: L1 Unit Tests on: pull_request: - branches: [ develop, main , feature/L1-test-result-upload ] + branches: [ develop ] env: AUTOMATICS_UNAME: ${{ secrets.AUTOMATICS_UNAME }}