mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 05:49:27 +00:00
Add Tuner VTS test assets and configure the push file preparer
Test: atest VtsHalTvTunerV1_0TargetTest Test: atest VtsHalTvTunerV1_1TargetTest Bug: 161745584 Change-Id: I5fe55bc846ef8b4b3336ea65b2efb63c2de829ac
This commit is contained in:
@@ -41,6 +41,9 @@ cc_test {
|
||||
shared_libs: [
|
||||
"libbinder",
|
||||
],
|
||||
data: [
|
||||
":tuner_frontend_input_ts",
|
||||
],
|
||||
test_suites: [
|
||||
"general-tests",
|
||||
"vts",
|
||||
|
||||
34
tv/tuner/1.0/vts/functional/AndroidTest.xml
Normal file
34
tv/tuner/1.0/vts/functional/AndroidTest.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2020 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<configuration description="Runs VtsHalTvTunerV1_0TargetTest.">
|
||||
<option name="test-suite-tag" value="apct" />
|
||||
<option name="test-suite-tag" value="apct-native" />
|
||||
|
||||
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
|
||||
</target_preparer>
|
||||
|
||||
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
|
||||
<option name="cleanup" value="true" />
|
||||
<option name="push" value="VtsHalTvTunerV1_0TargetTest->/data/local/tmp/VtsHalTvTunerV1_0TargetTest" />
|
||||
<option name="push" value="test.es->/data/local/tmp/test.es" />
|
||||
<option name="push" value="segment000000.ts->/data/local/tmp/segment000000.ts" />
|
||||
</target_preparer>
|
||||
|
||||
<test class="com.android.tradefed.testtype.GTest" >
|
||||
<option name="native-test-device-path" value="/data/local/tmp" />
|
||||
<option name="module-name" value="VtsHalTvTunerV1_0TargetTest" />
|
||||
</test>
|
||||
</configuration>
|
||||
@@ -165,8 +165,9 @@ Return<Result> Filter::flush() {
|
||||
Return<Result> Filter::releaseAvHandle(const hidl_handle& avMemory, uint64_t avDataId) {
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
if ((avMemory.getNativeHandle()->numFds > 0) &&
|
||||
if (mSharedAvMemHandle != NULL && avMemory != NULL &&
|
||||
(mSharedAvMemHandle.getNativeHandle()->numFds > 0) &&
|
||||
(avMemory.getNativeHandle()->numFds > 0) &&
|
||||
(sameFile(avMemory.getNativeHandle()->data[0],
|
||||
mSharedAvMemHandle.getNativeHandle()->data[0]))) {
|
||||
freeSharedAvHandle();
|
||||
|
||||
@@ -40,6 +40,9 @@ cc_test {
|
||||
shared_libs: [
|
||||
"libbinder",
|
||||
],
|
||||
data: [
|
||||
":tuner_frontend_input_es",
|
||||
],
|
||||
test_suites: [
|
||||
"general-tests",
|
||||
"vts",
|
||||
|
||||
33
tv/tuner/1.1/vts/functional/AndroidTest.xml
Normal file
33
tv/tuner/1.1/vts/functional/AndroidTest.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2020 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<configuration description="Runs VtsHalTvTunerV1_1TargetTest.">
|
||||
<option name="test-suite-tag" value="apct" />
|
||||
<option name="test-suite-tag" value="apct-native" />
|
||||
|
||||
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
|
||||
</target_preparer>
|
||||
|
||||
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
|
||||
<option name="cleanup" value="true" />
|
||||
<option name="push" value="VtsHalTvTunerV1_1TargetTest->/data/local/tmp/VtsHalTvTunerV1_1TargetTest" />
|
||||
<option name="push" value="test.es->/data/local/tmp/test.es" />
|
||||
</target_preparer>
|
||||
|
||||
<test class="com.android.tradefed.testtype.GTest" >
|
||||
<option name="native-test-device-path" value="/data/local/tmp" />
|
||||
<option name="module-name" value="VtsHalTvTunerV1_1TargetTest" />
|
||||
</test>
|
||||
</configuration>
|
||||
@@ -179,7 +179,7 @@ TEST_P(TunerFilterHidlTest, ConfigIpFilterInDemuxWithCid) {
|
||||
configSingleFilterInDemuxTest(filterArray[IP_IP0], frontendArray[DVBT]);
|
||||
}
|
||||
|
||||
TEST_P(TunerFilterHidlTest, ReonfigFilterToReceiveStartId) {
|
||||
TEST_P(TunerFilterHidlTest, ReconfigFilterToReceiveStartId) {
|
||||
description("Recofigure and restart a filter to test start id.");
|
||||
// TODO use parameterized tests
|
||||
reconfigSingleFilterInDemuxTest(filterArray[TS_VIDEO0], filterArray[TS_VIDEO1],
|
||||
|
||||
17
tv/tuner/assets/Android.bp
Normal file
17
tv/tuner/assets/Android.bp
Normal file
@@ -0,0 +1,17 @@
|
||||
genrule {
|
||||
name: "tuner_frontend_input_es",
|
||||
srcs: ["tuner_frontend_input.es"],
|
||||
out: [
|
||||
"test.es",
|
||||
],
|
||||
cmd: "cp -f $(in) $(genDir)/test.es",
|
||||
}
|
||||
|
||||
genrule {
|
||||
name: "tuner_frontend_input_ts",
|
||||
srcs: ["tuner_frontend_input.ts"],
|
||||
out: [
|
||||
"segment000000.ts",
|
||||
],
|
||||
cmd: "cp -f $(in) $(genDir)/segment000000.ts",
|
||||
}
|
||||
BIN
tv/tuner/assets/tuner_frontend_input.es
Normal file
BIN
tv/tuner/assets/tuner_frontend_input.es
Normal file
Binary file not shown.
BIN
tv/tuner/assets/tuner_frontend_input.ts
Normal file
BIN
tv/tuner/assets/tuner_frontend_input.ts
Normal file
Binary file not shown.
Reference in New Issue
Block a user