Update VtsHalWifiV1_0HostTest.py
* No need to use a separate testCase class.
Test: make vts
vts-tradefed run vts -m VtsHalWifiV1_0Host
Change-Id: I2fce8307ba5bcf47c357503d954024f5458b407b
diff --git a/wifi/V1_0/host/VtsHalWifiV1_0HostTest.py b/wifi/V1_0/host/VtsHalWifiV1_0HostTest.py
index c2c313d..61f8461 100644
--- a/wifi/V1_0/host/VtsHalWifiV1_0HostTest.py
+++ b/wifi/V1_0/host/VtsHalWifiV1_0HostTest.py
@@ -20,7 +20,6 @@
from vts.runners.host import const
from vts.runners.host import test_runner
from vts.testcases.template.hal_hidl_gtest import hal_hidl_gtest
-from vts.testcases.hal.wifi.V1_0.host import VtsHalWifiV1_0TestCase as wifi_test_case
class VtsHalWifiV1_0Host(hal_hidl_gtest.HidlHalGTest):
@@ -47,13 +46,10 @@
A list of VtsHalWifiV1_0TestCase objects
"""
gtest_cases = super(VtsHalWifiV1_0Host, self).CreateTestCase(path, tag)
- test_cases = []
for gtest_case in gtest_cases:
- test_case = wifi_test_case.VtsHalWifiV1_0TestCase(
- self._nan_on, gtest_case.full_name, gtest_case.test_name, path)
- test_cases.append(test_case)
- logging.info("num of test_testcases: %s", len(test_cases))
- return test_cases
+ if self._nan_on:
+ gtest_cases.args += "--nan_on"
+ return gtest_cases
if __name__ == "__main__":
diff --git a/wifi/V1_0/host/VtsHalWifiV1_0TestCase.py b/wifi/V1_0/host/VtsHalWifiV1_0TestCase.py
deleted file mode 100644
index bc8af65..0000000
--- a/wifi/V1_0/host/VtsHalWifiV1_0TestCase.py
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (C) 2017 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.
-#
-
-from vts.testcases.template.gtest_binary_test import gtest_test_case
-
-class VtsHalWifiV1_0TestCase(gtest_test_case.GtestTestCase):
- """A class to represent a WiFi HAL VTS test case.
-
- Attributes:
- _nan: boolean, whether WiFi NAN feature is supported on the device.
- """
-
- def __init__(self, nan, *args, **kwargs):
- super(VtsHalWifiV1_0TestCase, self).__init__(*args, **kwargs)
- self._nan = nan
-
- # @Override
- def GetRunCommand(self):
- """Get the command to run the test. """
- orig_cmds = super(VtsHalWifiV1_0TestCase,
- self).GetRunCommand(test_name=self.test_suite),
- new_cmd = [('{cmd}{nan_on}').format(
- cmd=orig_cmds[0][0], nan_on=" --nan_on" if self._nan else ""),
- orig_cmds[0][1]]
- return new_cmd