-
Notifications
You must be signed in to change notification settings - Fork 12
RDKEMW-5763 - NetworkManager Legacy Plugins - Improve L1/L2 Test coverage #201
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
Merged
+2,351
−80
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
48c6794
RDKEMW-5763 - NetworkManager Legacy Plugins - Improve L1/L2 Test cove…
gururaajar a0ee3ac
RDKEMW-5763 - NetworkManager Legacy Plugins - Improve L1/L2 Test cove…
gururaajar e5a0676
Merge branch 'topic/RDKEMW-5757_new' of github.com:rdkcentral/network…
gururaajar 92ab3ee
Merge branch 'topic/RDKEMW-5757_new' of github.com:rdkcentral/network…
gururaajar 6e9ec0c
Merge branch 'topic/RDKEMW-5757_new' of github.com:rdkcentral/network…
gururaajar aa01da2
Merge branch 'topic/RDKEMW-5757_new' of github.com:rdkcentral/network…
gururaajar 0b2343d
Merge branch 'topic/RDKEMW-5757_new' of github.com:rdkcentral/network…
gururaajar bd3bed4
Merge branch 'topic/RDKEMW-5757_new' of github.com:rdkcentral/network…
gururaajar 7c72dd1
Merge branch 'topic/RDKEMW-5757_new' of github.com:rdkcentral/network…
gururaajar 912f58f
Merge branch 'topic/RDKEMW-5757_new' of github.com:rdkcentral/network…
gururaajar f06e57e
Merge branch 'topic/RDKEMW-5757_new' of github.com:rdkcentral/network…
gururaajar a67c3ff
Merge branch 'topic/RDKEMW-5757_new' of github.com:rdkcentral/network…
gururaajar 6e4b305
Merge branch 'topic/RDKEMW-5757_new' of github.com:rdkcentral/network…
gururaajar 5a13968
Merge branch 'topic/RDKEMW-5757_new' of github.com:rdkcentral/network…
gururaajar ec0f55e
Merge branch 'topic/RDKEMW-5757_new' of github.com:rdkcentral/network…
gururaajar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,171 @@ | ||
| name: legacy_l1_l2_tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, develop, 'support/**', 'hotfix/**', 'topic/**'] | ||
| pull_request: | ||
| branches: [ main, develop, 'support/**', 'hotfix/**', 'topic/**'] | ||
|
|
||
| env: | ||
| THUNDER_REF: "R4.4.3" | ||
|
|
||
| jobs: | ||
| L1-tests: | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| name: Build and run unit tests | ||
| runs-on: ubuntu-22.04 | ||
|
|
||
| steps: | ||
| # Set up Thunder cache | ||
| - name: Set up Thunder cache | ||
| id: cache | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| !build/Thunder | ||
| build/ThunderInterfaces | ||
| build/ThunderTools | ||
| install | ||
| !install/etc/WPEFramework/plugins | ||
| !install/usr/bin/rdkproxy_l1_test | ||
| !install/usr/include/gmock | ||
| !install/usr/include/gtest | ||
| !install/usr/lib/libgmockd.a | ||
| !install/usr/lib/libgmock_maind.a | ||
| !install/usr/lib/libgtestd.a | ||
| !install/usr/lib/libgtest_maind.a | ||
| !install/usr/lib/cmake/GTest | ||
| !install/usr/lib/pkgconfig/gmock.pc | ||
| !install/usr/lib/pkgconfig/gmock_main.pc | ||
| !install/usr/lib/pkgconfig/gtest.pc | ||
| !install/usr/lib/pkgconfig/gtest_main.pc | ||
| !install/usr/lib/wpeframework/plugins | ||
| key: thunder-${{ env.THUNDER_REF }}-rdk | ||
| - name: Install packages | ||
| run: | | ||
| sudo apt update | ||
| sudo apt-get install -y pkg-config libglib2.0-dev libnm-dev libcurl4-openssl-dev lcov ninja-build libgupnp-1.2-1 libgupnp-1.2-dev libgssdp-1.2-0 libsoup2.4-1 | ||
|
|
||
| - name: Configure Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.x' | ||
| - run: pip install jsonref | ||
|
|
||
| - name: Configure CMake | ||
| uses: jwlawson/actions-setup-cmake@v1.13 | ||
| with: | ||
| cmake-version: '3.16.x' | ||
| - name: Checkout thunder repositories | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
| run: | | ||
| git clone https://github.com/rdkcentral/ThunderTools ThunderTools --branch ${{ env.THUNDER_REF }} | ||
| git clone https://github.com/rdkcentral/Thunder Thunder --branch ${{ env.THUNDER_REF }} | ||
| git clone https://github.com/rdkcentral/ThunderInterfaces ThunderInterfaces --branch ${{ env.THUNDER_REF }} | ||
|
|
||
| - name: Checkout networkmanager | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| path: networkmanager | ||
|
|
||
| - name: Apply Thunder Patches | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
| run: | | ||
| cd ${{github.workspace}}/Thunder | ||
| git apply ${{github.workspace}}/networkmanager/tests/patches/thunder/SubscribeStub.patch | ||
|
|
||
| - name: Build ThunderTools | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
| run: > | ||
| cmake | ||
| -S "${{github.workspace}}/ThunderTools" -B build/ThunderTools | ||
| -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install/usr" | ||
| -DCMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake" | ||
| -DGENERIC_CMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake" | ||
| && | ||
| cmake --build build/ThunderTools --target install -j8 | ||
|
|
||
| - name: Build Thunder | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
| run: > | ||
| cmake | ||
| -S "${{github.workspace}}/Thunder" -B build/Thunder | ||
| -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install/usr" | ||
| -DCMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake" | ||
| -DBUILD_TYPE=Debug | ||
| -DBINDING=127.0.0.1 | ||
| -DPORT=9998 | ||
| && | ||
| cmake --build build/Thunder --target install -j8 | ||
|
|
||
| - name: ThunderInterfaces | ||
| if: steps.cache.outputs.cache-hit != 'true' | ||
| run: > | ||
| cmake | ||
| -S "${{github.workspace}}/ThunderInterfaces" -B build/ThunderInterfaces | ||
| -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install/usr" | ||
| -DCMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake" | ||
| && | ||
| cmake --build build/ThunderInterfaces --target install -j8 | ||
|
|
||
| - name: Generate IARM headers | ||
| run: | | ||
| touch install/usr/lib/libIARMBus.so | ||
| mkdir -p install/usr/include/rdk/iarmbus | ||
| touch install/usr/include/rdk/iarmbus/libIARM.h | ||
| cd "${{github.workspace}}/networkmanager/tests/" | ||
| mkdir -p headers/rdk/iarmbus | ||
| cd headers | ||
| touch rdk/iarmbus/libIARM.h rdk/iarmbus/libIBus.h | ||
|
|
||
| - name: Build networkmanager with RDK Proxy | ||
| run: > | ||
| cmake | ||
| -S "${{github.workspace}}/networkmanager" | ||
| -B build/networkmanager_rdk | ||
| -DCMAKE_TOOLCHAIN_FILE="${{ env.TOOLCHAIN_FILE }}" | ||
| -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install/usr" | ||
| -DCMAKE_MODULE_PATH="${{github.workspace}}/install/tools/cmake" | ||
| -DCMAKE_CXX_FLAGS=" | ||
| -I ${{github.workspace}}/networkmanager/tests/headers | ||
| -I ${{github.workspace}}/networkmanager/tests/headers/rdk/iarmbus | ||
| --include ${{github.workspace}}/networkmanager/tests/mocks/Iarm.h | ||
| --include ${{github.workspace}}/networkmanager/tests/mocks/secure_wrappermock.h | ||
| -Wall --coverage | ||
| " | ||
| -DENABLE_UNIT_TESTING=ON | ||
| -DENABLE_ROUTER_DISCOVERY_TOOL=ON | ||
| && | ||
| cmake --build build/networkmanager_rdk --target install -j8 | ||
|
|
||
| - name: Run unit tests for Legacy_Network | ||
| run: > | ||
| PATH=${{github.workspace}}/install/usr/bin:${PATH} | ||
| LD_LIBRARY_PATH=${{github.workspace}}/install/usr/lib:${{github.workspace}}/install/usr/lib/wpeframework/plugins:${LD_LIBRARY_PATH} | ||
| legacynetwork_tests | ||
|
|
||
| - name: Run unit tests for Legacy_WiFi | ||
| run: > | ||
| PATH=${{github.workspace}}/install/usr/bin:${PATH} | ||
| LD_LIBRARY_PATH=${{github.workspace}}/install/usr/lib:${{github.workspace}}/install/usr/lib/wpeframework/plugins:${LD_LIBRARY_PATH} | ||
| legacywifi_tests | ||
|
|
||
| - name: Generate coverage | ||
| run: | | ||
| lcov -c -o coverage.info -d build/networkmanager_rdk | ||
| lcov -r coverage.info '/usr/include/*' '*/build/networkmanager_rdk/*' \ | ||
| '*/install/usr/include/*' '*/tests/*' 'googlemock/*' 'googletest/*' \ | ||
| -o filtered_coverage.info | ||
| - name: Generate the html report | ||
| run: | | ||
| genhtml filtered_coverage.info --output-directory /tmp/coverage_report | ||
|
|
||
| - name: Upload the coverage report to Pull request using actions | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: coverage-report | ||
| path: | | ||
| /tmp/coverage_report | ||
| /tmp/gtest_log | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.