Skip to content

RDKEMW-5610 : L1 test cases for jsruntime#64

Closed
trupthi1403 wants to merge 1 commit into
developfrom
topic/RDKEMW-5610
Closed

RDKEMW-5610 : L1 test cases for jsruntime#64
trupthi1403 wants to merge 1 commit into
developfrom
topic/RDKEMW-5610

Conversation

@trupthi1403

Copy link
Copy Markdown
Contributor

Reason for Change : Added some flags to use mock headers, changes required to build l1
Test Procedure : L1 build must be successful
Risk : Low

@trupthi1403 trupthi1403 requested a review from a team as a code owner September 25, 2025 12:55
Comment on lines +16 to +100
runs-on: ubuntu-latest

steps:
- name: Checkout source repository
uses: actions/checkout@v3

- name: Checkout rdkNativeScript_tests repository
uses: actions/checkout@v3
with:
repository: rdk-e/rdkNativeScript_tests
ref: topic/RDKEMW-5610
path: rdkNativeScript_tests
token: ${{ secrets.GH_PAT }}

- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
g++ \
cmake \
build-essential \
libcurl4-openssl-dev \
libcjson-dev \
libgtest-dev \
libssl-dev \
zlib1g-dev \
libuv1-dev \
lcov \
libglib2.0-dev

- name: Build Google Test and Google Mock
run: |
cd /usr/src/googletest
sudo cmake -S . -B build
sudo cmake --build build
sudo cp build/lib/libgmock.a /usr/lib
sudo cp build/lib/libgmock_main.a /usr/lib
sudo cp build/lib/libgtest.a /usr/lib
sudo cp build/lib/libgtest_main.a /usr/lib

- name: Configure and Build L1
run: |
mkdir -p build_l1
cd build_l1
cmake -DCMAKE_BUILD_TYPE=Debug \
-DRUN_L1=ON \
-DRUN_L2=OFF \
-DENABLE_JSRUNTIME_ESSOS=ON \
-DENABLE_JSRUNTIME_PLAYER=ON \
-DENABLE_AAMP_JSBINDINGS=ON \
-DENABLE_AAMP_JSBINDINGS_DYNAMIC=ON \
-DENABLE_AAMP_JSBINDINGS_STATIC=OFF \
-DJSRUNTIME_ENGINE_NAME=jsc \
-Djsruntime_source=.. ../rdkNativeScript_tests
make -j$(nproc)

- name: Run L1 Tests and Generate JUnit Results
run: |
cd build_l1
ctest -R RunL1Tests --output-on-failure --no-compress-output --output-junit ctest-results.xml

- name: Publish L1 test results
uses: dorny/test-reporter@v1
with:
name: Unit Test Results
path: build_l1/ctest-results.xml
reporter: java-junit

- name: Generate coverage report
run: |
cd build_l1
lcov --capture --directory . --output-file coverage.info --ignore-errors mismatch
genhtml coverage.info --output-directory html_coverage_report

- name: Upload test result file (JUnit XML)
uses: actions/upload-artifact@v4
with:
name: ctest-results-l1-${{ github.run_id }}
path: build_l1/ctest-results.xml

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: l1-html-coverage-report
path: build_l1/html_coverage_report
if-no-files-found: warn

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Copyright scan failure
Commit: df89346
Report detail: https://gist.github.com/rdkcmf-jenkins/d2f03d7faf72f40ea350a5c748b59ed6'

@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## WARNING: A Copyright scan failure has been waived

A prior failure has been upvoted

  • Upvote reason: OK - tools issue

  • Commit: df89346
    '

Reason for Change : Added some flags to use mock headers, changes required to
build l1
Test Procedure : L1 build must be successful
Risk : Low
@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Copyright scan failure
Commit: e8d015b
Report detail: https://gist.github.com/rdkcmf-jenkins/f647f234b1bc706c76326c4ed35376c9'

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants