support package scope prepare/teardown

* introduced concept of module test config as AndroidTest.xml;
  for now target preparers can be defined in it to complete tasks
  before and after (CTS) package scope test execution
* modified CtsTest to invoke the preparers around package scope
  test execution
* modified related makefiles to "install" the module test config
  into CTS repository/testcases
* default common test config that included the commonly useful
  preparers
* modified accessibility tests to adopt module test config

Bug: 19442125

Change-Id: I1c694997c96c37150399395de2fbc464264c2aba
diff --git a/build/module_test_config.mk b/build/module_test_config.mk
new file mode 100644
index 0000000..5cbaf0d
--- /dev/null
+++ b/build/module_test_config.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2015 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.
+
+cts_module_test_config := $(if $(wildcard \
+	$(LOCAL_PATH)/$(CTS_MODULE_TEST_CONFIG)), \
+	$(CTS_TESTCASES_OUT)/$(LOCAL_PACKAGE_NAME).config)
+ifneq ($(cts_module_test_config),)
+$(cts_module_test_config): $(LOCAL_PATH)/$(CTS_MODULE_TEST_CONFIG)
+	$(call copy-file-to-target)
+endif