Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
6791519
Update L2-tests.yml
balav08 Nov 17, 2025
1bdf523
Update MaintenancemanagerL2.cpp
balav08 Nov 19, 2025
0be910e
Update MaintenancemanagerL2.cpp
balav08 Nov 19, 2025
f8879c1
Merge pull request #174 from rdkcentral/develop
balav08 Nov 20, 2025
2bcf266
Update L2-tests.yml
balav08 Nov 20, 2025
e3edcf5
Update L1-tests.yml
balav08 Nov 21, 2025
5d132ec
Update L2-tests.yml
balav08 Nov 21, 2025
07a8abe
Update L1-tests.yml
balav08 Nov 21, 2025
f4055f7
Update L2-tests.yml
balav08 Nov 21, 2025
0eebe13
Update L1-tests.yml
balav08 Nov 21, 2025
be6f202
Update L2-tests.yml
balav08 Nov 21, 2025
6ecaba7
Merge pull request #176 from rdkcentral/develop
balav08 Nov 27, 2025
9ad1c4f
Decrease sleep time in maintenance tests
balav08 Nov 27, 2025
cbcbea5
Simplify L2 test workflow by removing GDB logging
balav08 Nov 27, 2025
5f3705f
Merge pull request #178 from rdkcentral/develop
balav08 Dec 1, 2025
602b13b
Merge pull request #181 from rdkcentral/develop
balav08 Dec 5, 2025
0e96778
Update MaintenancemanagerL2.cpp
balav08 Dec 9, 2025
9e84a5b
Update MaintenancemanagerL2.cpp
balav08 Dec 11, 2025
49816a6
Update MaintenancemanagerL2.cpp
balav08 Dec 11, 2025
ef620b4
Update MaintenancemanagerL2.cpp
balav08 Dec 11, 2025
0ab5043
Merge branch 'feature/L1-L2test' of https://github.com/rdkcentral/ent…
balaji-86 Dec 11, 2025
3e2e761
Merge branch 'feature/L1-L2test' of https://github.com/rdkcentral/ent…
balaji-86 Dec 11, 2025
a25fad1
Merge branch 'feature/L1-L2test' of https://github.com/rdkcentral/ent…
balaji-86 Dec 11, 2025
d2e053a
Update MaintenancemanagerL2.cpp
balav08 Dec 11, 2025
f3ab9f0
Update L2-tests.yml
smanes0213 Dec 12, 2025
bc6bd6d
Improve MaintainanceManager L2 test
smanes0213 Dec 15, 2025
42445b6
Add conditional check for tests running with valgrind and coverage ge…
smanes0213 Dec 18, 2025
dd99d80
Update L1-tests.yml
smanes0213 Dec 18, 2025
8d950bb
Update Tests/L2Tests/tests/MaintenancemanagerL2.cpp
smanes0213 Dec 18, 2025
af0885d
Update Tests/L2Tests/tests/MaintenancemanagerL2.cpp
smanes0213 Dec 18, 2025
109bc11
Update L2-tests.yml
smanes0213 Dec 18, 2025
c0691a9
Update L1-tests.yml
smanes0213 Dec 18, 2025
040a9f7
Update MaintenancemanagerL2.cpp
smanes0213 Dec 18, 2025
fef3471
Fix L1 cache collision: Add repository-specific cache key
smanes0213 Dec 23, 2025
1cd62a5
Fix L1 cache paths to match actual build output locations
smanes0213 Dec 24, 2025
f718e57
Add cache-hit condition to patch steps to prevent errors when cache i…
smanes0213 Dec 24, 2025
e4ec051
Remove cache-hit condition from entservices-apis checkout - needed on…
smanes0213 Dec 24, 2025
dc6cd16
Remove cache-hit conditions from googletest - excluded from cache so …
smanes0213 Dec 24, 2025
a26c49f
Always checkout Thunder source - headers needed for builds even when …
smanes0213 Dec 24, 2025
79adedb
Remove Thunder source includes from builds - use only installed heade…
smanes0213 Dec 24, 2025
764fc22
Always checkout Thunder source and add includes for testframework bui…
smanes0213 Dec 24, 2025
5f5b920
Remove duplicate Thunder source includes from component build, keep o…
smanes0213 Dec 24, 2025
2763b66
Merge branch 'develop' into Test_Workflow
smanes0213 Dec 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 28 additions & 34 deletions .github/workflows/L1-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

env:
BUILD_TYPE: Debug
REPO_NAME: "softwareupdate"
THUNDER_REF: "R4.4.1"
INTERFACES_REF: "develop"
AUTOMATICS_UNAME: ${{ secrets.AUTOMATICS_UNAME}}
Expand Down Expand Up @@ -45,25 +46,25 @@ jobs:
uses: actions/cache@v3
with:
path: |
thunder/build/Thunder
thunder/build/entservices-apis
thunder/build/ThunderTools
thunder/install
!thunder/install/etc/WPEFramework/plugins
!thunder/install/usr/bin/RdkServicesTest
!thunder/install/usr/include/gmock
!thunder/install/usr/include/gtest
!thunder/install/usr/lib/libgmockd.a
!thunder/install/usr/lib/libgmock_maind.a
!thunder/install/usr/lib/libgtestd.a
!thunder/install/usr/lib/libgtest_maind.a
!thunder/install/usr/lib/cmake/GTest
!thunder/install/usr/lib/pkgconfig/gmock.pc
!thunder/install/usr/lib/pkgconfig/gmock_main.pc
!thunder/install/usr/lib/pkgconfig/gtest.pc
!thunder/install/usr/lib/pkgconfig/gtest_main.pc
!thunder/install/usr/lib/wpeframework/plugins
key: ${{ runner.os }}-${{ env.THUNDER_REF }}-${{ env.INTERFACES_REF }}-4
build/Thunder
build/entservices-apis
build/ThunderTools
install
!install/etc/WPEFramework/plugins
!install/usr/bin/RdkServicesTest
!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: ${{ runner.os }}-${{ env.REPO_NAME }}-${{ env.THUNDER_REF }}-${{ env.INTERFACES_REF }}-4

- name: Set up Python
uses: actions/setup-python@v4
Expand Down Expand Up @@ -103,7 +104,6 @@ jobs:
sudo ninja -C build install

- name: Checkout Thunder
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: rdkcentral/Thunder
Expand Down Expand Up @@ -138,17 +138,17 @@ jobs:
with:
repository: rdkcentral/entservices-softwareupdate
path: entservices-softwareupdate
ref: develop
ref: Test_Workflow

- name: Checkout googletest
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: google/googletest
path: googletest
ref: v1.15.0

- name: Apply patches ThunderTools
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd $GITHUB_WORKSPACE/ThunderTools
patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/patches/00010-R4.4-Add-support-for-project-dir.patch
Expand All @@ -170,6 +170,7 @@ jobs:
cmake --install build/ThunderTools

- name: Apply patches Thunder
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd $GITHUB_WORKSPACE/Thunder
patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/patches/Use_Legact_Alt_Based_On_ThunderTools_R4.4.3.patch
Expand Down Expand Up @@ -199,7 +200,6 @@ jobs:
cmake --install build/Thunder

- name: Checkout entservices-apis
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: rdkcentral/entservices-apis
Expand Down Expand Up @@ -312,7 +312,6 @@ jobs:
run: echo "TOOLCHAIN_FILE=$GITHUB_WORKSPACE/entservices-testframework/Tests/gcc-with-coverage.cmake" >> $GITHUB_ENV

- name: Build googletest
if: steps.cache.outputs.cache-hit != 'true'
run: >
cmake -G Ninja
-S "$GITHUB_WORKSPACE/googletest"
Expand Down Expand Up @@ -359,8 +358,6 @@ jobs:
-I $GITHUB_WORKSPACE/entservices-testframework/Tests/headers/network
-I $GITHUB_WORKSPACE/entservices-testframework/Tests
-I $GITHUB_WORKSPACE/entservices-softwareupdate/helpers
-I $GITHUB_WORKSPACE/Thunder/Source
-I $GITHUB_WORKSPACE/Thunder/Source/core
-I $GITHUB_WORKSPACE/install/usr/include
-I ./usr/include/libdrm
-include $GITHUB_WORKSPACE/entservices-testframework/Tests/mocks/devicesettings.h
Expand Down Expand Up @@ -418,8 +415,6 @@ jobs:
-I $GITHUB_WORKSPACE/entservices-testframework/Tests/headers/ccec/drivers
-I $GITHUB_WORKSPACE/entservices-testframework/Tests/headers/network
-I $GITHUB_WORKSPACE/entservices-testframework/Tests
-I $GITHUB_WORKSPACE/Thunder/Source
-I $GITHUB_WORKSPACE/Thunder/Source/core
-I $GITHUB_WORKSPACE/install/usr/include
-I $GITHUB_WORKSPACE/install/usr/include/WPEFramework
-include $GITHUB_WORKSPACE/entservices-testframework/Tests/mocks/devicesettings.h
Expand Down Expand Up @@ -468,7 +463,7 @@ jobs:
-DPLUGIN_MAINTENANCEMANAGER=ON
-DPLUGIN_PACKAGER=ON
&&
cmake --build build/entservices-softwareupdate -j8
cmake --build build/entservices-softwareupdate
&&
cmake --install build/entservices-softwareupdate

Expand Down Expand Up @@ -497,10 +492,10 @@ jobs:
-I $GITHUB_WORKSPACE/entservices-testframework/Tests/headers/network
-I $GITHUB_WORKSPACE/entservices-softwareupdate/helpers
-I $GITHUB_WORKSPACE/entservices-testframework/Tests
-I $GITHUB_WORKSPACE/Thunder/Source
-I $GITHUB_WORKSPACE/Thunder/Source/core
-I $GITHUB_WORKSPACE/install/usr/include
-I $GITHUB_WORKSPACE/install/usr/include/WPEFramework
-I $GITHUB_WORKSPACE/Thunder/Source
-I $GITHUB_WORKSPACE/Thunder/Source/core
-I ./usr/include/libdrm
-include $GITHUB_WORKSPACE/entservices-testframework/Tests/mocks/devicesettings.h
-include $GITHUB_WORKSPACE/entservices-testframework/Tests/mocks/Iarm.h
Expand All @@ -514,7 +509,6 @@ jobs:
-include $GITHUB_WORKSPACE/entservices-testframework/Tests/mocks/wpa_ctrl_mock.h
-include $GITHUB_WORKSPACE/entservices-testframework/Tests/mocks/readprocMockInterface.h
-include $GITHUB_WORKSPACE/entservices-testframework/Tests/mocks/gdialservice.h
-include $GITHUB_WORKSPACE/entservices-testframework/Tests/mocks/thunder/Communicator.h
--coverage
-Wall -Wno-unused-result -Wno-deprecated-declarations -Wno-error=format=
-Wl,-wrap,system -Wl,-wrap,popen -Wl,-wrap,syslog -Wl,--no-as-needed
Expand Down Expand Up @@ -642,7 +636,7 @@ jobs:
rm -rf $(pwd)/rdkL1TestResults.json

- name: Run unit tests with valgrind
if: ${{ !env.ACT }}
if: ${{ !env.ACT && inputs.caller_source != 'testframework' }}
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}
Expand All @@ -659,7 +653,7 @@ jobs:
rm -rf $(pwd)/rdkL1TestResults.json

- name: Generate coverage
if: ${{ matrix.coverage == 'with-coverage' && !env.ACT }}
if: ${{ matrix.coverage == 'with-coverage' && !env.ACT && inputs.caller_source != 'testframework' }}
run: >
cp $GITHUB_WORKSPACE/entservices-testframework/Tests/L1Tests/.lcovrc_l1 ~/.lcovrc
&&
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/L2-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
with:
repository: rdkcentral/entservices-softwareupdate
path: entservices-softwareupdate
ref: develop
ref: Test_Workflow
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow is being changed to use a test branch 'Test_Workflow' instead of 'develop'. This appears to be a temporary change for testing purposes and should likely not be merged to the main branch. Using a test branch reference in the workflow configuration could cause CI/CD failures once the test branch is removed or if the branch doesn't exist in production environments.

Suggested change
ref: Test_Workflow
ref: develop

Copilot uses AI. Check for mistakes.

- name: Checkout entservices-testframework
uses: actions/checkout@v3
Expand Down Expand Up @@ -426,7 +426,7 @@ jobs:
-DDS_FOUND=ON
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
&&
cmake --build build/entservices-softwareupdate -j8
cmake --build build/entservices-softwareupdate
&&
cmake --install build/entservices-softwareupdate

Expand Down Expand Up @@ -611,7 +611,7 @@ jobs:
rm -rf $(pwd)/rdkL2TestResults.json

- name: Run unit tests with valgrind
if: ${{ !env.ACT }}
if: ${{ !env.ACT && inputs.caller_source != 'testframework' }}
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}
Expand All @@ -627,7 +627,7 @@ jobs:
rm -rf $(pwd)/rdkL2TestResults.json

- name: Generate coverage
if: ${{ matrix.coverage == 'with-coverage' && !env.ACT }}
if: ${{ matrix.coverage == 'with-coverage' && !env.ACT && inputs.caller_source != 'testframework' }}
run: >
cp $GITHUB_WORKSPACE/entservices-testframework/Tests/L2Tests/.lcovrc_l2 ~/.lcovrc
&&
Expand Down
44 changes: 34 additions & 10 deletions Tests/L2Tests/tests/MaintenancemanagerL2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,22 +118,25 @@ TEST_F(MaintenanceManagerTest, getMaintenanceStartTime_json_rpc)
MaintenanceManagerConfFile << "start_min=\"30\"\n";
MaintenanceManagerConfFile << "tz_mode=\"UTC\"\n";
MaintenanceManagerConfFile.close();
std::ifstream MaintenanceManagerConfFile("/opt/rdk_maintenance.conf");
if (!MaintenanceManagerConfFile) {
std::cerr << "Failed to open /opt/rdk_maintenance.conf for reading." << std::endl;
}

}

std::ifstream verifyFile("/opt/rdk_maintenance.conf");
if (!verifyFile) {
std::cerr << "Failed to open /opt/rdk_maintenance.conf for reading." << std::endl;
} else {
std::string line;
while (std::getline(MaintenanceManagerConfFile, line)) {
while (std::getline(verifyFile, line)) {
std::cout << line << std::endl;
}
verifyFile.close();
}
Comment on lines +123 to +132
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The verification code reads and prints the configuration file content to stdout, but there are no assertions to verify that the file was written correctly or contains the expected content. This debug output provides limited value in automated tests and makes test output more verbose. Consider either adding assertions to verify the file content or removing this verification block if it's not necessary for the test.

Copilot uses AI. Check for mistakes.

status = InvokeServiceMethod("org.rdk.MaintenanceManager", "getMaintenanceStartTime", params1, results1);
ASSERT_EQ(results1["success"].Boolean(), true);
ASSERT_EQ(status, Core::ERROR_NONE);
}


}

//getMaintenanceActivityStatus jsonRPC
TEST_F(MaintenanceManagerTest,getMaintenanceActivityStatus)
{
Expand Down Expand Up @@ -163,9 +166,30 @@ TEST_F(MaintenanceManagerTest,stopMaintenance)
{
uint32_t status = Core::ERROR_GENERAL;
JsonObject params1, results1;
bool maintenanceStarted = false;

// Wait for maintenance to actually start (with timeout)
int retries = 10; // 10 seconds max
while (retries-- > 0) {
status = InvokeServiceMethod("org.rdk.MaintenanceManager","getMaintenanceActivityStatus",params1, results1);
if ((status == Core::ERROR_NONE) &&
results1.HasLabel("maintenanceStatus") &&
results1["maintenanceStatus"].String() == "MAINTENANCE_STARTED") {
maintenanceStarted = true;
break;
}
sleep(1);
}

// Verify maintenance is running
ASSERT_TRUE(maintenanceStarted)
<< "Maintenance did not start within timeout. Last status: "
<< results1["maintenanceStatus"].String();

// Now stop the active maintenance
status = InvokeServiceMethod("org.rdk.MaintenanceManager","stopMaintenance",params1, results1);
ASSERT_EQ(results1["success"].Boolean(), true);
ASSERT_EQ(status, Core::ERROR_NONE);
ASSERT_EQ(results1["success"].Boolean(), true);
}

//startMaintenance jsonPRC Test on an active Maintenance Cycle
Expand Down
Loading