Merge "VTS: fix some logic errors for tuner HAL vts [1/1]" into android11-tests-dev am: 0638fc1ede

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1919318

Bug: 208191849
Change-Id: Ida7b10a22c9c72ac9bc0fffc97750aaf27860fd7
This commit is contained in:
Treehugger Robot 2021-12-17 00:28:32 +00:00 committed by Hongguang Chen
parent 0a5a431d31
commit 4cdc4f20b7
3 changed files with 6 additions and 0 deletions

2
tv/tuner/1.0/vts/functional/FrontendTests.cpp Normal file → Executable file
View file

@ -377,6 +377,7 @@ AssertionResult FrontendTests::tuneFrontend(FrontendConfig config, bool testWith
result &= getDvrTests()->getDvrPlaybackMQDescriptor() == success();
getDvrTests()->startPlaybackInputThread(mDvrConfig.playbackInputFile,
mDvrConfig.settings.playback());
getDvrTests()->startDvrPlayback();
if (!result) {
ALOGW("[vts] Software frontend dvr configure failed.");
return failure();
@ -400,6 +401,7 @@ AssertionResult FrontendTests::stopTuneFrontend(bool testWithDemux) {
status = mFrontend->stopTune();
if (mIsSoftwareFe && testWithDemux) {
getDvrTests()->stopPlaybackThread();
getDvrTests()->stopDvrPlayback();
getDvrTests()->closeDvrPlayback();
}
return AssertionResult(status == Result::SUCCESS);

View file

@ -444,6 +444,7 @@ AssertionResult FrontendTests::tuneFrontend(FrontendConfig1_1 config, bool testW
result &= getDvrTests()->getDvrPlaybackMQDescriptor() == success();
getDvrTests()->startPlaybackInputThread(mDvrConfig.playbackInputFile,
mDvrConfig.settings.playback());
getDvrTests()->startDvrPlayback();
if (!result) {
ALOGW("[vts] Software frontend dvr configure failed.");
return failure();
@ -459,6 +460,7 @@ AssertionResult FrontendTests::stopTuneFrontend(bool testWithDemux) {
status = mFrontend->stopTune();
if (mIsSoftwareFe && testWithDemux) {
getDvrTests()->stopPlaybackThread();
getDvrTests()->stopDvrPlayback();
getDvrTests()->closeDvrPlayback();
}
return AssertionResult(status == Result::SUCCESS);

View file

@ -437,6 +437,7 @@ AssertionResult FrontendTests::tuneFrontend(FrontendConfig config, bool testWith
getDvrTests()->startPlaybackInputThread(
mDvrConfig.playbackInputFile,
mDvrConfig.settings.get<DvrSettings::Tag::playback>());
getDvrTests()->startDvrPlayback();
}
mFrontendCallback->tuneTestOnLock(mFrontend, config.settings);
return AssertionResult(true);
@ -448,6 +449,7 @@ AssertionResult FrontendTests::stopTuneFrontend(bool testWithDemux) {
status = mFrontend->stopTune();
if (mIsSoftwareFe && testWithDemux) {
getDvrTests()->stopPlaybackThread();
getDvrTests()->stopDvrPlayback();
getDvrTests()->closeDvrPlayback();
}
return AssertionResult(status.isOk());