Skip to content

Revert "Fixed Unit Tests to build reliable on docker environment" - #574

Open
DouglasAdler wants to merge 1 commit into
masterfrom
revert-568-feature/RIALTO-fix-unit-tests
Open

Revert "Fixed Unit Tests to build reliable on docker environment"#574
DouglasAdler wants to merge 1 commit into
masterfrom
revert-568-feature/RIALTO-fix-unit-tests

Conversation

@DouglasAdler

Copy link
Copy Markdown

Reverts #568

This PR was breaking target builds

Copilot AI review requested due to automatic review settings July 27, 2026 14:15
@github-actions

Copy link
Copy Markdown

Pull request must be merged with a description containing the required fields,

Summary:
Type: Feature/Fix/Cleanup
Test Plan:
Jira:

If there is no jira releated to this change, please put 'Jira: NO-JIRA'.

Description can be changed by editing the top comment on your pull request and making a new commit.

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

Reverts prior unit-test/build-environment changes (#568) that were reported to break target builds, primarily by rolling back the IGstGenericPlayerFactory::createGstGenericPlayer signature and related test/build-script adjustments.

Changes:

  • Reverts createGstGenericPlayer API to remove the injectable IGstProfilerFactory parameter and updates unit tests/mocks accordingly.
  • Updates gst generic player construction path to use IGstProfilerFactory::getFactory() internally again.
  • Reverts parts of the gtest build/run tooling and googletest CMake integration to the previous approach.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/unittests/media/server/mocks/gstplayer/GstGenericPlayerFactoryMock.h Updates mocked factory method signature to match reverted API.
tests/unittests/media/server/main/mediaPipeline/LoadTest.cpp Updates EXPECT_CALL argument count for reverted factory API.
tests/unittests/media/server/main/mediaPipeline/base/MediaPipelineTestBase.cpp Updates EXPECT_CALL argument count for reverted factory API.
tests/unittests/media/server/gstplayer/genericPlayer/CreateTest.cpp Adjusts factory creation test expectations for profiler-related refs/unrefs after API revert.
scripts/gtest/build_and_run_tests.py Reverts CLI validation/jobs control and tweaks environment setup for test runs.
media/server/gstplayer/source/GstGenericPlayer.cpp Reverts factory signature and reverts profiler-factory resolution to internal singleton usage.
media/server/gstplayer/interface/IGstGenericPlayer.h Reverts interface signature and updates associated doc comment.
media/server/gstplayer/include/IGstProfiler.h Adds profiler interface/factory header under gstplayer include tree.
media/server/gstplayer/include/GstGenericPlayer.h Updates factory override signature and includes profiler header.
CMakeLists.txt Switches unit/component test configuration to include cmake/googletest.cmake.
cmake/googletest.cmake Simplifies gtest_discover_tests invocation (removing prior version-conditional behavior).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +79 to 82
# Clean if required
if args['clean'] == True:
executeCmd = ["rm", "-rf", "--", args['output'], valgrindOutput + ".log"]
executeCmd = ["rm", "-rf", args['output'], valgrindOutput + ".log"]
runcmd(executeCmd, cwd=os.getcwd())
Comment on lines 112 to 116
gstPlayer = std::make_unique<
GstGenericPlayer>(client, decryptionService, type, videoRequirements, isLive, gstWrapper, glibWrapper,
rdkGstreamerUtilsWrapper, IGstInitialiser::instance(), std::make_unique<FlushWatcher>(),
IGstSrcFactory::getFactory(), resolvedGstProfilerFactory,
IGstSrcFactory::getFactory(), IGstProfilerFactory::getFactory(),
common::ITimerFactory::getFactory(),

/**
* @brief Creates an IGstGenericPlayer object.
* @brief Creates a IGstGenericPlayer object.
Comment on lines 155 to 159
EXPECT_CALL(*m_gstWrapperMock, gstElementSetState(&m_pipeline, GST_STATE_READY))
.WillOnce(Return(GST_STATE_CHANGE_SUCCESS));
EXPECT_CALL(*m_gstWrapperMock, gstObjectRef(&m_pipeline)).WillOnce(Return(&m_pipeline));

std::shared_ptr<firebolt::rialto::server::IGstGenericPlayerFactory> factory =
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.4%
Congratulations, your commit improved functions coverage from: 92.7% to 92.8%

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