VPAAMP-454 Enable AAMP L1 AampGstPlayer tests#1644
Draft
jfagunde wants to merge 2 commits into
Draft
Conversation
Reason for Change: Protect against regressions in AampGstPlayer code Summary of Changes: - Add AampGstPlayer L1 test directory - Add L1 AampGstPlayerMain file - Remove middleware code from L1 AampGstPlayer CMake file - Delete tests that verified middleware code - Update existing L1 tests - Add middleware fakes Test Procedure: Run AAMP L1 tests Priority: P1 Risks: Low
Contributor
There was a problem hiding this comment.
Pull request overview
Enables/repairs AAMP L1 coverage around aampgstplayer.cpp by reworking the AampGstPlayer test suite to build without pulling in the full middleware pipeline, and by introducing additional fakes to satisfy link-time dependencies.
Changes:
- Registers the
AampGstPlayerL1 test target in the utests build and refactors its CMake to compile onlyaampgstplayer.cppplus the local test sources. - Removes middleware-focused test cases (including the default subtitle mute suite) and streamlines remaining
AampGstPlayerL1 tests to use the shared_ptr-based mock globals. - Adds new middleware fakes (notably
FakeInterfacePlayerRDK) and a newAampGstPlayergtestmain().
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/utests/tests/CMakeLists.txt | Adds the AampGstPlayer subdirectory to the utests build. |
| test/utests/tests/AampGstPlayer/NullGuardTests.cpp | Updates fixture mock setup/teardown to use shared_ptr-based globals and removes middleware-only expectations. |
| test/utests/tests/AampGstPlayer/FunctionalTests.cpp | Removes middleware/pipeline-heavy tests and simplifies to basic AAMPGstPlayer behavior checks with updated mock plumbing. |
| test/utests/tests/AampGstPlayer/DefaultSubtitleMuteTests.cpp | Deletes middleware-implementation tests that no longer fit the intended L1 isolation boundary. |
| test/utests/tests/AampGstPlayer/CMakeLists.txt | Drops middleware sources/libs from the test build and adds a suite-local main(). |
| test/utests/tests/AampGstPlayer/AampGstPlayerMain.cpp | Adds the gtest entry point for the AampGstPlayer test executable. |
| test/utests/fakes/FakeInterfacePlayerRDK.cpp | Introduces a stubbed InterfacePlayerRDK to allow aampgstplayer.cpp to link without real middleware. |
| test/utests/fakes/FakeCachedFragment.cpp | Adds a fake CachedFragment implementation (currently problematic due to collisions with existing CachedFragmentTests). |
Comment on lines
+22
to
+26
| CachedFragment::CachedFragment() | ||
| : fragment() | ||
| , position(0.0) | ||
| , duration(0.0) | ||
| , initFragment(false) |
| g_mockAampConfig = new NiceMock<MockAampConfig>(); | ||
| g_mockGstHandlerControl= new MockGstHandlerControl(); | ||
| g_mockPrivateInstanceAAMP = new MockPrivateInstanceAAMP(); | ||
| g_mockGLib = std::make_shared<MockGLib>(); |
| g_mockPrivateInstanceAAMP = new MockPrivateInstanceAAMP(); | ||
| g_mockGLib = std::make_shared<MockGLib>(); | ||
| g_mockAampConfig = std::make_shared<NiceMock<MockAampConfig>>(); | ||
| g_mockPrivateInstanceAAMP = std::make_shared<MockPrivateInstanceAAMP>(); |
| g_mockPrivateInstanceAAMP = new MockPrivateInstanceAAMP(); | ||
| g_mockGLib = std::make_shared<NiceMock<MockGLib>>(); | ||
| g_mockAampConfig = std::make_shared<NiceMock<MockAampConfig>>(); | ||
| g_mockPrivateInstanceAAMP = std::make_shared<MockPrivateInstanceAAMP>(); |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reason for Change: Protect against regressions in AampGstPlayer code
Summary of Changes:
Test Procedure: Run AAMP L1 tests
Priority: P1
Risks: Low