• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2017 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17import logging
18import os
19
20from vts.testcases.template.gtest_binary_test import gtest_test_case
21
22class VtsHalMediaOmxV1_0TestCase(gtest_test_case.GtestTestCase):
23    """A class to represent a media_omx test case.
24
25    Attributes:
26        component: string, name of a IOmxNode component.
27        role: string, role of a IOmxNode component.
28        instance: string, name of the binderized hal server instance.
29    """
30
31    def __init__(self, component, role, instance, *args, **kwargs):
32        super(VtsHalMediaOmxV1_0TestCase, self).__init__(*args, **kwargs)
33        self._component = component
34        self._role = role
35        self._instance = instance
36
37    # @Override
38    def GetRunCommand(self):
39        """Get the command to run the test. """
40
41        orig_cmds = super(VtsHalMediaOmxV1_0TestCase,
42                          self).GetRunCommand(test_name=self.test_suite),
43
44        new_cmd = [('{cmd} -I {instance} -C {component} -R {role}').format(
45            cmd=orig_cmds[0][0],
46            instance=self._instance,
47            component=self._component,
48            role=self._role), orig_cmds[0][1]]
49
50        return new_cmd
51