Skip to content

VPAAMP-454 Enable AAMP L1 AampGstPlayer tests#1644

Draft
jfagunde wants to merge 2 commits into
dev_sprint_25_2from
feature/VPAAMP-454
Draft

VPAAMP-454 Enable AAMP L1 AampGstPlayer tests#1644
jfagunde wants to merge 2 commits into
dev_sprint_25_2from
feature/VPAAMP-454

Conversation

@jfagunde

Copy link
Copy Markdown
Contributor

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

jfagunde added 2 commits June 23, 2026 13:31
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 AampGstPlayer L1 test target in the utests build and refactors its CMake to compile only aampgstplayer.cpp plus the local test sources.
  • Removes middleware-focused test cases (including the default subtitle mute suite) and streamlines remaining AampGstPlayer L1 tests to use the shared_ptr-based mock globals.
  • Adds new middleware fakes (notably FakeInterfacePlayerRDK) and a new AampGstPlayer gtest main().

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>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants