summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Campbell <ryanjcampbell@google.com>2017-03-07 02:17:33 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-03-07 02:17:33 +0000
commit4d094d479452733ef1660f07f5615fcbf3dbe132 (patch)
tree76d3924fc11e99e7a426f0154f243d5854029832
parentfd7380d08eb8505a3ec69076c2756ddc995233d6 (diff)
parentf6ed517c9ea448b850024da97e40a49c1fc224b9 (diff)
downloadhal-o-preview.tar.gz
Merge "Update base test class."android-o-preview-1o-preview
-rw-r--r--nfc/V1_0/host/VtsHalNfcV1_0HostTest.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/nfc/V1_0/host/VtsHalNfcV1_0HostTest.py b/nfc/V1_0/host/VtsHalNfcV1_0HostTest.py
index 447b0189..85d7403a 100644
--- a/nfc/V1_0/host/VtsHalNfcV1_0HostTest.py
+++ b/nfc/V1_0/host/VtsHalNfcV1_0HostTest.py
@@ -19,15 +19,14 @@ import logging
import time
from vts.runners.host import asserts
-from vts.runners.host import base_test_with_webdb
+from vts.runners.host import base_test
from vts.runners.host import test_runner
from vts.utils.python.controllers import android_device
-from vts.utils.python.coverage import coverage_utils
PASSTHROUGH_MODE_KEY = "passthrough_mode"
-class NfcHidlBasicTest(base_test_with_webdb.BaseTestWithWebDbClass):
+class NfcHidlBasicTest(base_test.BaseTestClass):
"""A simple testcase for the NFC HIDL HAL."""
def setUpClass(self):
@@ -56,6 +55,10 @@ class NfcHidlBasicTest(base_test_with_webdb.BaseTestWithWebDbClass):
target_component_name="INfc",
bits=64 if self.dut.is64Bit else 32)
+ if self.coverage.enabled:
+ self.coverage.LoadArtifacts()
+ self.coverage.InitializeDeviceCoverage(self._dut)
+
def tearDownClass(self):
"""Turns off the framework-layer NFC service."""
# Ideally, we would want to store the nfc service's state before
@@ -104,7 +107,8 @@ class NfcHidlBasicTest(base_test_with_webdb.BaseTestWithWebDbClass):
result = self.dut.hal.nfc.close()
logging.info("close result: %s", result)
- self.SetCoverageData(coverage_utils.GetGcdaDict(self.dut))
+ if self.coverage.enabled:
+ self.coverage.SetCoverageData(dut=self.dut, isGlobal=True)
if __name__ == "__main__":
test_runner.main()