Merge "Separate old and new test config files."
diff --git a/build/module_test_config.mk b/build/module_test_config.mk
index 6584ef2..fec4893 100644
--- a/build/module_test_config.mk
+++ b/build/module_test_config.mk
@@ -12,10 +12,10 @@
# 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_MODULE).config)
-ifneq ($(cts_module_test_config),)
-$(cts_module_test_config): $(LOCAL_PATH)/$(CTS_MODULE_TEST_CONFIG) | $(ACP)
+ifneq ($(LOCAL_CTS_MODULE_CONFIG),)
+cts_module_test_config := $(CTS_TESTCASES_OUT)/$(LOCAL_MODULE).config
+$(cts_module_test_config): $(LOCAL_CTS_MODULE_CONFIG) | $(ACP)
$(call copy-file-to-target)
endif
+# clear var
+LOCAL_CTS_MODULE_CONFIG :=
diff --git a/suite/cts/deviceTests/jank2/Android.mk b/suite/cts/deviceTests/jank2/Android.mk
index 346297e..a3400f3 100644
--- a/suite/cts/deviceTests/jank2/Android.mk
+++ b/suite/cts/deviceTests/jank2/Android.mk
@@ -26,4 +26,6 @@
LOCAL_STATIC_JAVA_LIBRARIES := ctsdeviceutil ctstestrunner ub-uiautomator ub-janktesthelper
+LOCAL_CTS_MODULE_CONFIG := $(LOCAL_PATH)/Old$(CTS_MODULE_TEST_CONFIG)
+
include $(BUILD_CTS_PACKAGE)
diff --git a/suite/cts/deviceTests/jank2/AndroidTest.xml b/suite/cts/deviceTests/jank2/OldAndroidTest.xml
similarity index 100%
rename from suite/cts/deviceTests/jank2/AndroidTest.xml
rename to suite/cts/deviceTests/jank2/OldAndroidTest.xml
diff --git a/tests/tests/accessibility/Android.mk b/tests/tests/accessibility/Android.mk
index bb943ee..5d3284e 100644
--- a/tests/tests/accessibility/Android.mk
+++ b/tests/tests/accessibility/Android.mk
@@ -26,4 +26,6 @@
LOCAL_STATIC_JAVA_LIBRARIES := ctsdeviceutil ctstestrunner
+LOCAL_CTS_MODULE_CONFIG := $(LOCAL_PATH)/Old$(CTS_MODULE_TEST_CONFIG)
+
include $(BUILD_CTS_PACKAGE)
diff --git a/tests/tests/accessibility/AndroidTest.xml b/tests/tests/accessibility/OldAndroidTest.xml
similarity index 100%
rename from tests/tests/accessibility/AndroidTest.xml
rename to tests/tests/accessibility/OldAndroidTest.xml
diff --git a/tests/tests/app/Android.mk b/tests/tests/app/Android.mk
index 4a3d31f..0ff6b91 100644
--- a/tests/tests/app/Android.mk
+++ b/tests/tests/app/Android.mk
@@ -31,4 +31,6 @@
LOCAL_INSTRUMENTATION_FOR := CtsAppTestStubs
+LOCAL_CTS_MODULE_CONFIG := $(LOCAL_PATH)/Old$(CTS_MODULE_TEST_CONFIG)
+
include $(BUILD_CTS_PACKAGE)
diff --git a/tests/tests/app/AndroidTest.xml b/tests/tests/app/OldAndroidTest.xml
similarity index 100%
rename from tests/tests/app/AndroidTest.xml
rename to tests/tests/app/OldAndroidTest.xml
diff --git a/tests/tests/display/Android.mk b/tests/tests/display/Android.mk
index f17f580..a42674d 100644
--- a/tests/tests/display/Android.mk
+++ b/tests/tests/display/Android.mk
@@ -27,6 +27,8 @@
LOCAL_PACKAGE_NAME := CtsDisplayTestCases
+LOCAL_CTS_MODULE_CONFIG := $(LOCAL_PATH)/Old$(CTS_MODULE_TEST_CONFIG)
+
LOCAL_SDK_VERSION := current
include $(BUILD_CTS_PACKAGE)
diff --git a/tests/tests/display/OldAndroidTest.xml b/tests/tests/display/OldAndroidTest.xml
new file mode 100644
index 0000000..dd42984
--- /dev/null
+++ b/tests/tests/display/OldAndroidTest.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Base config for CTS package preparer">
+ <include name="common-config" />
+ <!-- Use a non-standard pattern, must match values in tests/tests/display/.../DisplayTest.java -->
+ <option name="run-command:run-command" value="settings put global overlay_display_devices '181x161/214|181x161/214'" />
+ <option name="run-command:teardown-command" value="settings put global overlay_display_devices """ />
+</configuration>
diff --git a/tests/tests/hardware/Android.mk b/tests/tests/hardware/Android.mk
index 9523d87..13d14f0 100644
--- a/tests/tests/hardware/Android.mk
+++ b/tests/tests/hardware/Android.mk
@@ -53,6 +53,8 @@
LOCAL_PACKAGE_NAME := CtsHardwareTestCases
+LOCAL_CTS_MODULE_CONFIG := $(LOCAL_PATH)/Old$(CTS_MODULE_TEST_CONFIG)
+
LOCAL_SDK_VERSION := current
LOCAL_JAVA_LIBRARIES := android.test.runner
diff --git a/tests/tests/hardware/AndroidTest.xml b/tests/tests/hardware/OldAndroidTest.xml
similarity index 100%
rename from tests/tests/hardware/AndroidTest.xml
rename to tests/tests/hardware/OldAndroidTest.xml