Remove hal_coverage_measurement and hidl_trace_recorder

* No longer needed, run cts-hal-profiling/cts-hal-coverage to
  perform profiling/coverage_measurment for cts tests.

Test: None
Change-Id: Idfaea3de59cacc9971fe2b5364aaa72d1e605611
diff --git a/hal_coverage_measurement/Android.mk b/hal_coverage_measurement/Android.mk
deleted file mode 100644
index c10927a..0000000
--- a/hal_coverage_measurement/Android.mk
+++ /dev/null
@@ -1,23 +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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := VtsHalCoverageMeasurement
--include test/vts/tools/build/Android.host_config.mk
diff --git a/hal_coverage_measurement/AndroidTest.xml b/hal_coverage_measurement/AndroidTest.xml
deleted file mode 100644
index d47e46a..0000000
--- a/hal_coverage_measurement/AndroidTest.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-<configuration description="Config for Vts Hal Coverage Measurement test case">
-    <option name="config-descriptor:metadata" key="plan" value="vts-misc" />
-    <target_preparer class="com.android.tradefed.targetprep.VtsCoveragePreparer" />
-    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
-        <option name="push-group" value="HalHidlHostTest.push" />
-        <option name="cleanup" value="true" />
-    </target_preparer>
-    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="VtsHalCoverageMeasurement" />
-        <option name="test-case-path" value="vts/testcases/performance/hal_coverage_measurement/VtsHalCoverageMeasurement" />
-    </test>
-</configuration>
diff --git a/hal_coverage_measurement/VtsHalCoverageMeasurement.py b/hal_coverage_measurement/VtsHalCoverageMeasurement.py
deleted file mode 100644
index 9666e2c..0000000
--- a/hal_coverage_measurement/VtsHalCoverageMeasurement.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python
-#
-# 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.
-#
-
-import logging
-
-from vts.runners.host import test_runner
-from vts.testcases.template.cts_test import cts_test
-
-
-class VtsHalCoverageMeasurement(cts_test.CtsTest):
-    """A code coverage measurement test for CTS.
-
-    This class uses an apk which is packaged as part of VTS. It is used to measure
-    the code coverage of hal implementation accessed by the apk.
-    """
-
-    def setUpClass(self):
-        super(VtsHalCoverageMeasurement, self).setUpClass()
-        self.dut.start()  # start the framework.
-
-        # Initialization for coverage measurement.
-        if self.coverage.enabled and self.coverage.global_coverage:
-            self.coverage.InitializeDeviceCoverage(self.dut)
-
-    def tearDownClass(self):
-        if self.coverage.enabled and self.coverage.global_coverage:
-            self.coverage.SetCoverageData(dut=self.dut, isGlobal=True)
-        super(VtsHalCoverageMeasurement, self).tearDownClass()
-
-    def RunTestCase(self, test_case):
-        '''Runs a test_case.
-
-        Args:
-            test_case: a cts test config.
-        '''
-        logging.info("Installing %s", test_case["apk"])
-        self.dut.adb.install(test_case["apk"])
-        logging.info("Run %s", test_case["name"])
-        self.dut.adb.shell("am instrument -w -r %s/%s" % (test_case["package"],
-                                                          test_case["runner"]))
-
-        logging.info("Uninstalling %s", test_case["apk"])
-        self.dut.adb.uninstall(test_case["package"])
-
-
-if __name__ == "__main__":
-    test_runner.main()
diff --git a/hal_coverage_measurement/__init__.py b/hal_coverage_measurement/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/hal_coverage_measurement/__init__.py
+++ /dev/null
diff --git a/hidl_trace_recorder/Android.mk b/hidl_trace_recorder/Android.mk
deleted file mode 100644
index 9cb6a76..0000000
--- a/hidl_trace_recorder/Android.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := HidlTraceRecorder
--include test/vts/tools/build/Android.host_config.mk
diff --git a/hidl_trace_recorder/AndroidTest.xml b/hidl_trace_recorder/AndroidTest.xml
deleted file mode 100644
index feccbce..0000000
--- a/hidl_trace_recorder/AndroidTest.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 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.
--->
-<configuration description="Config for VTS Sensor Module HIDL Trace Recoder test case">
-    <option name="config-descriptor:metadata" key="plan" value="vts-misc" />
-    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
-        <option name="push-group-remount-system" value="true" />
-        <option name="push-group" value="RecordReplayTest.push" />
-        <option name="cleanup" value="true" />
-    </target_preparer>
-    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
-        <!-- TODO(yim): reenable when CtsSensorTestCases.apk is not flaky
-        <option name="test-file-name" value="DATA/app/CtsSensorTestCases/CtsSensorTestCases.apk" /> -->
-        <option name="test-file-name" value="CtsAccelerationTestCases.apk" />
-        <option name="cleanup-apks" value="true" />
-    </target_preparer>
-    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
-        <option name="test-module-name" value="HidlTraceRecorder" />
-        <option name="test-case-path" value="vts/testcases/performance/hidl_trace_recorder/HidlTraceRecorder" />
-    </test>
-</configuration>
diff --git a/hidl_trace_recorder/HidlTraceRecorder.py b/hidl_trace_recorder/HidlTraceRecorder.py
deleted file mode 100644
index 9cba11a..0000000
--- a/hidl_trace_recorder/HidlTraceRecorder.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2016 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.
-#
-
-import datetime
-import logging
-import os
-
-from vts.runners.host import asserts
-from vts.runners.host import test_runner
-from vts.testcases.template.cts_test import cts_test
-
-
-class HidlTraceRecorder(cts_test.CtsTest):
-    """A HIDL HAL API trace recorder.
-
-    This class uses an apk which is packaged as part of VTS. It uses to test the
-    VTS TF's instrumentation preparer and post-processing modules. Those two
-    Java TF-side modules are cherry-picked to CTS to collect HIDL traces while
-    running various CTS test cases without having to package them as part of
-    VTS.
-    """
-
-    REMOTE_PROFILINT_TRACE_PATH = "/google/data/rw/teams/android-vts/cts-traces"
-
-    def RunTestCase(self, test_case):
-        '''Runs a test_case.
-
-        Args:
-            test_case: a cts test config.
-        '''
-        # before running the cts test module enable profiling.
-        self.profiling.EnableVTSProfiling(
-            self.dut.shell.one, hal_instrumentation_lib_path="")
-        self.dut.stop()  # stop framework
-        self.dut.start()  # start framework
-
-        profiling_trace_path = os.path.join(
-            self.REMOTE_PROFILINT_TRACE_PATH,
-            datetime.datetime.now().strftime("%Y%m%d"),
-            self.GetTestName(test_case))
-        if not os.path.exists(profiling_trace_path):
-            os.makedirs(profiling_trace_path)
-
-        logging.info("Run %s", self.GetTestName(test_case))
-        self.dut.adb.shell("am instrument -w -r %s/%s" % (test_case["package"],
-                                                          test_case["runner"]))
-
-        # after running the cts test module, copy trace files and disable profiling.
-        self.profiling.GetTraceFiles(self.dut, profiling_trace_path)
-        self.profiling.DisableVTSProfiling(self.dut.shell.one)
-
-if __name__ == "__main__":
-    test_runner.main()
diff --git a/hidl_trace_recorder/__init__.py b/hidl_trace_recorder/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/hidl_trace_recorder/__init__.py
+++ /dev/null