Skip to content

Commit 3b0c211

Browse files
authored
RDKEMW-4155 : Fix L1/L2 tests for HdcpProfile plugin (#102)
* Update L1-tests.yml * RDKEMW-4155 : Fix L1/L2 tests for HdcpProfile plugin * Update L1-tests.yml
1 parent e210ba1 commit 3b0c211

File tree

3 files changed

+48
-40
lines changed

3 files changed

+48
-40
lines changed

.github/workflows/L1-tests.yml

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: L1-tests
22

33
on:
44
push:
5-
branches: [ main, develop, 'sprint/**', 'release/**' ]
5+
branches: [ main, develop, 'sprint/**', 'release/**', 'topic/RDK*' ]
66
pull_request:
7-
branches: [ main, develop, 'sprint/**', 'release/**' ]
7+
branches: [ main, develop, 'sprint/**', 'release/**', 'topic/RDK*' ]
88

99
env:
1010
BUILD_TYPE: Debug
@@ -345,7 +345,7 @@ jobs:
345345
-DDS_FOUND=ON
346346
-DHAS_FRONT_PANEL=ON
347347
-DRDK_SERVICES_L1_TEST=ON
348-
-DPLUGIN_HDCPPROFILE=OFF
348+
-DPLUGIN_HDCPPROFILE=ON
349349
-DPLUGIN_HDMICECSOURCE=ON
350350
-DPLUGIN_HDMICECSINK=ON
351351
-DUSE_THUNDER_R4=ON
@@ -419,7 +419,7 @@ jobs:
419419
-DCMAKE_DISABLE_FIND_PACKAGE_CEC=ON
420420
-DCMAKE_BUILD_TYPE=Debug
421421
-DDS_FOUND=ON
422-
-DPLUGIN_HDCPPROFILE=OFF
422+
-DPLUGIN_HDCPPROFILE=ON
423423
-DPLUGIN_HDMICECSOURCE=ON
424424
-DPLUGIN_HDMICECSINK=ON
425425
-DRDK_SERVICES_L1_TEST=ON
@@ -541,39 +541,39 @@ jobs:
541541
cp -rf $(pwd)/rdkL1TestResults.json $GITHUB_WORKSPACE/rdkL1TestResultsWithValgrind.json &&
542542
rm -rf $(pwd)/rdkL1TestResults.json
543543
544-
# - name: Generate coverage
545-
# if: ${{ matrix.coverage == 'with-coverage' && !env.ACT }}
546-
# run: >
547-
# cp $GITHUB_WORKSPACE/entservices-testframework/Tests/L1Tests/.lcovrc_l1 ~/.lcovrc
548-
# &&
549-
# lcov -c
550-
# -o coverage.info
551-
# -d build/entservices-inputoutput
552-
# &&
553-
# lcov
554-
# -r coverage.info
555-
# '/usr/include/*'
556-
# '*/build/entservices-inputoutput/_deps/*'
557-
# '*/install/usr/include/*'
558-
# '*/Tests/headers/*'
559-
# '*/Tests/mocks/*'
560-
# '*/Tests/L1Tests/tests/*'
561-
# '*/Thunder/*'
562-
# -o filtered_coverage.info
563-
# &&
564-
# genhtml
565-
# -o coverage
566-
# -t "entservices-inputoutput coverage"
567-
# filtered_coverage.info
544+
- name: Generate coverage
545+
if: ${{ matrix.coverage == 'with-coverage' && !env.ACT }}
546+
run: >
547+
cp $GITHUB_WORKSPACE/entservices-testframework/Tests/L1Tests/.lcovrc_l1 ~/.lcovrc
548+
&&
549+
lcov -c
550+
-o coverage.info
551+
-d build/entservices-inputoutput
552+
&&
553+
lcov
554+
-r coverage.info
555+
'/usr/include/*'
556+
'*/build/entservices-inputoutput/_deps/*'
557+
'*/install/usr/include/*'
558+
'*/Tests/headers/*'
559+
'*/Tests/mocks/*'
560+
'*/Tests/L1Tests/tests/*'
561+
'*/Thunder/*'
562+
-o filtered_coverage.info
563+
&&
564+
genhtml
565+
-o coverage
566+
-t "entservices-inputoutput coverage"
567+
filtered_coverage.info
568568
569-
# - name: Upload artifacts
570-
# if: ${{ !env.ACT }}
571-
# uses: actions/upload-artifact@v4
572-
# with:
573-
# name: artifacts
574-
# path: |
575-
# coverage/
576-
# valgrind_log
577-
# rdkL1TestResultsWithoutValgrind.json
578-
# rdkL1TestResultsWithValgrind.json
579-
# if-no-files-found: warn
569+
- name: Upload artifacts
570+
if: ${{ !env.ACT }}
571+
uses: actions/upload-artifact@v4
572+
with:
573+
name: artifacts
574+
path: |
575+
coverage/
576+
valgrind_log
577+
rdkL1TestResultsWithoutValgrind.json
578+
rdkL1TestResultsWithValgrind.json
579+
if-no-files-found: warn

HdcpProfile/HdcpProfile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ namespace WPEFramework
8484
{
8585
message = _T("HdcpProfile could not be configured");
8686
}
87+
configure->Release();
8788
}
8889
else
8990
{
@@ -126,7 +127,6 @@ namespace WPEFramework
126127

127128
_hdcpProfile->Unregister(&_hdcpProfileNotification);
128129
Exchange::JHdcpProfile::Unregister(*this);
129-
130130
// Stop processing:
131131
RPC::IRemoteConnection *connection = service->RemoteConnection(_connectionId);
132132
VARIABLE_IS_NOT_USED uint32_t result = _hdcpProfile->Release();

HdcpProfile/HdcpProfileImplementation.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@
6161
HdcpProfileImplementation::~HdcpProfileImplementation()
6262
{
6363
LOGINFO("Call HdcpProfileImplementation destructor\n");
64+
if (_powerManagerPlugin) {
65+
_powerManagerPlugin.Reset();
66+
}
67+
if(_service != nullptr)
68+
{
69+
_service->Release();
70+
}
71+
DeinitializeIARM();
6472
HdcpProfileImplementation::_instance = nullptr;
6573
mShell = nullptr;
6674
}

0 commit comments

Comments
 (0)