summaryrefslogtreecommitdiffstats
path: root/vr
diff options
context:
space:
mode:
authorZhuoyao Zhang <zhuoyao@google.com>2017-01-17 18:07:23 -0800
committerZhuoyao Zhang <zhuoyao@google.com>2017-01-17 20:10:26 -0800
commit6ec5b21a815a7bd1a3a233505a550be9b09d18ce (patch)
treebd1bef1dc16f96bc22411bed3e2301313641a6ba /vr
parent1fcf593701617bb98b7ba9cf51293c59ab578ce2 (diff)
downloadandroid_hardware_interfaces-6ec5b21a815a7bd1a3a233505a550be9b09d18ce.tar.gz
android_hardware_interfaces-6ec5b21a815a7bd1a3a233505a550be9b09d18ce.tar.bz2
android_hardware_interfaces-6ec5b21a815a7bd1a3a233505a550be9b09d18ce.zip
Update profiling code for host-side tests.
* Parse profiling data for each test case. * Merge the profiling data for each test case at the end of test and upload the profiling info to web. Bug:34226555 Test: run vts -m VibratorHidlProfilingTest Change-Id: I9e13eada8e7db338a29c6943868d12e76844e2c4
Diffstat (limited to 'vr')
-rw-r--r--vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/host/VrHidlTest.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/host/VrHidlTest.py b/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/host/VrHidlTest.py
index 933fcdeea..d20e9ceac 100644
--- a/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/host/VrHidlTest.py
+++ b/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/host/VrHidlTest.py
@@ -39,9 +39,6 @@ class VrHidlTest(base_test_with_webdb.BaseTestWithWebDbClass):
self.dut.shell.one.Execute(
"setprop vts.hal.vts.hidl.get_stub true")
- if self.enable_profiling:
- profiling_utils.EnableVTSProfiling(self.dut.shell.one)
-
self.dut.hal.InitHidlHal(
target_type="vr",
target_basepaths=["/system/lib64"],
@@ -56,9 +53,17 @@ class VrHidlTest(base_test_with_webdb.BaseTestWithWebDbClass):
and disable profiling after the test is done.
"""
if self.enable_profiling:
+ self.ProcessAndUploadTraceData()
+
+ def setUpTest(self):
+ if self.enable_profiling:
+ profiling_utils.EnableVTSProfiling(self.dut.shell.one)
+
+ def tearDownTest(self):
+ if self.enable_profiling:
profiling_trace_path = getattr(
self, self.VTS_PROFILING_TRACING_PATH, "")
- self.ProcessAndUploadTraceData(self.dut, profiling_trace_path)
+ self.ProcessTraceDataForTestCase(self.dut, profiling_trace_path)
profiling_utils.DisableVTSProfiling(self.dut.shell.one)
def testVrBasic(self):