blob: bc8af6579a423e2812158027a7e5ddc215a7d13d [file] [log] [blame]
Keun Soo Yim2314dd82017-07-10 15:55:32 -07001#
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
17from vts.testcases.template.gtest_binary_test import gtest_test_case
18
19class VtsHalWifiV1_0TestCase(gtest_test_case.GtestTestCase):
20 """A class to represent a WiFi HAL VTS test case.
21
22 Attributes:
23 _nan: boolean, whether WiFi NAN feature is supported on the device.
24 """
25
26 def __init__(self, nan, *args, **kwargs):
27 super(VtsHalWifiV1_0TestCase, self).__init__(*args, **kwargs)
28 self._nan = nan
29
30 # @Override
31 def GetRunCommand(self):
32 """Get the command to run the test. """
33 orig_cmds = super(VtsHalWifiV1_0TestCase,
34 self).GetRunCommand(test_name=self.test_suite),
35 new_cmd = [('{cmd}{nan_on}').format(
36 cmd=orig_cmds[0][0], nan_on=" --nan_on" if self._nan else ""),
37 orig_cmds[0][1]]
38 return new_cmd