The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1 | # Copyright (C) 2008 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | cts_dir := $(HOST_OUT)/cts |
| 16 | cts_tools_src_dir := cts/tools |
| 17 | |
| 18 | cts_name := android-cts |
| 19 | |
Phil Dubach | 9e35a86 | 2009-05-11 11:00:16 -0700 | [diff] [blame] | 20 | CTS_EXECUTABLE := startcts |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 21 | ifeq ($(HOST_OS),windows) |
| 22 | CTS_EXECUTABLE_PATH := $(cts_tools_src_dir)/host/etc/cts.bat |
| 23 | else |
Phil Dubach | 9e35a86 | 2009-05-11 11:00:16 -0700 | [diff] [blame] | 24 | CTS_EXECUTABLE_PATH := $(cts_tools_src_dir)/utils/$(CTS_EXECUTABLE) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 25 | endif |
| 26 | CTS_HOST_JAR := $(HOST_OUT_JAVA_LIBRARIES)/cts.jar |
| 27 | |
Brett Chabot | 67bae7f | 2009-06-26 14:41:30 -0700 | [diff] [blame] | 28 | junit_host_jar := $(HOST_OUT_JAVA_LIBRARIES)/junit.jar |
Phil Dubach | 3b7521b | 2009-08-19 16:26:40 -0700 | [diff] [blame] | 29 | HOSTTESTLIB_JAR := $(HOST_OUT_JAVA_LIBRARIES)/hosttestlib.jar |
Brett Chabot | 67bae7f | 2009-06-26 14:41:30 -0700 | [diff] [blame] | 30 | |
Urs Grob | b3c6b2d | 2009-04-17 11:27:08 -0700 | [diff] [blame] | 31 | CTS_CORE_CASE_LIST := android.core.tests.annotation \ |
| 32 | android.core.tests.archive \ |
| 33 | android.core.tests.concurrent \ |
| 34 | android.core.tests.crypto \ |
| 35 | android.core.tests.dom \ |
| 36 | android.core.tests.logging \ |
Urs Grob | b3c6b2d | 2009-04-17 11:27:08 -0700 | [diff] [blame] | 37 | android.core.tests.luni.io \ |
| 38 | android.core.tests.luni.lang \ |
| 39 | android.core.tests.luni.net \ |
| 40 | android.core.tests.luni.util \ |
| 41 | android.core.tests.math \ |
| 42 | android.core.tests.nio \ |
| 43 | android.core.tests.nio_char \ |
| 44 | android.core.tests.prefs \ |
| 45 | android.core.tests.regex \ |
| 46 | android.core.tests.security \ |
| 47 | android.core.tests.sql \ |
| 48 | android.core.tests.text \ |
| 49 | android.core.tests.xml \ |
Jorg Pleumann | 6178820 | 2009-05-07 01:33:14 -0700 | [diff] [blame] | 50 | android.core.tests.xnet \ |
| 51 | android.core.tests.runner |
Urs Grob | b3c6b2d | 2009-04-17 11:27:08 -0700 | [diff] [blame] | 52 | |
Phil Dubach | 3b7521b | 2009-08-19 16:26:40 -0700 | [diff] [blame] | 53 | CTS_SECURITY_APPS_LIST := \ |
| 54 | CtsAppAccessData \ |
| 55 | CtsAppWithData \ |
| 56 | CtsInstrumentationAppDiffCert \ |
| 57 | CtsPermissionDeclareApp \ |
| 58 | CtsSharedUidInstall \ |
| 59 | CtsSharedUidInstallDiffCert \ |
| 60 | CtsSimpleAppInstall \ |
| 61 | CtsSimpleAppInstallDiffCert \ |
| 62 | CtsTargetInstrumentationApp \ |
| 63 | CtsUsePermissionDiffCert |
| 64 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 65 | CTS_CASE_LIST := \ |
Brett Chabot | 2779fa7 | 2009-11-12 13:29:07 -0800 | [diff] [blame] | 66 | TestDeviceSetup \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 67 | CtsTestStubs \ |
Brett Chabot | 1e43c51 | 2009-12-17 15:14:40 -0800 | [diff] [blame] | 68 | CtsAccountManagerTestCases \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 69 | CtsAppTestCases \ |
Dan Bornstein | bb0c880 | 2009-11-20 13:13:41 -0800 | [diff] [blame] | 70 | CtsBluetoothTestCases \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 71 | CtsContentTestCases \ |
| 72 | CtsDatabaseTestCases \ |
Brett Chabot | 30e1f2b | 2009-09-10 13:35:54 -0700 | [diff] [blame] | 73 | CtsDpiTestCases \ |
| 74 | CtsDpiTestCases2 \ |
Dan Bornstein | 1347f92 | 2009-11-17 14:27:40 -0800 | [diff] [blame] | 75 | CtsExampleTestCases \ |
| 76 | CtsGestureTestCases \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 77 | CtsGraphicsTestCases \ |
The Android Open Source Project | fdd3a10 | 2009-03-11 12:11:54 -0700 | [diff] [blame] | 78 | CtsHardwareTestCases \ |
Dan Bornstein | 01833fb | 2009-11-18 17:18:07 -0800 | [diff] [blame] | 79 | CtsJniTestCases \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 80 | CtsLocationTestCases \ |
Phil Dubach | 571d0f2 | 2009-07-13 14:47:25 -0700 | [diff] [blame] | 81 | CtsMediaTestCases \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 82 | CtsOsTestCases \ |
The Android Open Source Project | fdd3a10 | 2009-03-11 12:11:54 -0700 | [diff] [blame] | 83 | CtsPermissionTestCases \ |
Brett Chabot | 7b5edc3 | 2009-07-28 20:11:24 -0700 | [diff] [blame] | 84 | CtsPermission2TestCases \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 85 | CtsProviderTestCases \ |
Brett Chabot | 45dc54f | 2009-09-16 18:56:23 -0700 | [diff] [blame] | 86 | CtsSpeechTestCases \ |
Phil Dubach | 951f3d8 | 2009-07-14 19:11:30 -0700 | [diff] [blame] | 87 | CtsTelephonyTestCases \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 88 | CtsTextTestCases \ |
| 89 | CtsUtilTestCases \ |
| 90 | CtsViewTestCases \ |
Phil Dubach | 951f3d8 | 2009-07-14 19:11:30 -0700 | [diff] [blame] | 91 | CtsWebkitTestCases \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 92 | CtsWidgetTestCases \ |
| 93 | CtsNetTestCases \ |
The Android Open Source Project | 6a5f7f0 | 2009-03-05 14:34:30 -0800 | [diff] [blame] | 94 | SignatureTest \ |
Bill Napier | f23f5b4 | 2009-04-23 10:14:59 -0700 | [diff] [blame] | 95 | CtsPerformanceTestCases \ |
| 96 | CtsPerformance2TestCases \ |
| 97 | CtsPerformance3TestCases \ |
| 98 | CtsPerformance4TestCases \ |
| 99 | CtsPerformance5TestCases \ |
Bill Napier | f22b9a0 | 2009-04-24 18:26:58 -0700 | [diff] [blame] | 100 | ApiDemos \ |
Bill Napier | f23f5b4 | 2009-04-23 10:14:59 -0700 | [diff] [blame] | 101 | ApiDemosReferenceTest \ |
Phil Dubach | 3b7521b | 2009-08-19 16:26:40 -0700 | [diff] [blame] | 102 | $(CTS_CORE_CASE_LIST) \ |
| 103 | $(CTS_SECURITY_APPS_LIST) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 104 | |
| 105 | DEFAULT_TEST_PLAN := $(PRIVATE_DIR)/resource/plans |
| 106 | |
Brett Chabot | 67bae7f | 2009-06-26 14:41:30 -0700 | [diff] [blame] | 107 | $(cts_dir)/all_cts_files_stamp: PRIVATE_JUNIT_HOST_JAR := $(junit_host_jar) |
| 108 | |
Phil Dubach | 3b7521b | 2009-08-19 16:26:40 -0700 | [diff] [blame] | 109 | $(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) $(junit_host_jar) $(HOSTTESTLIB_JAR) $(ACP) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 110 | # Make necessary directory for CTS |
| 111 | @rm -rf $(PRIVATE_CTS_DIR) |
| 112 | @mkdir -p $(TMP_DIR) |
| 113 | @mkdir -p $(PRIVATE_DIR)/docs |
| 114 | @mkdir -p $(PRIVATE_DIR)/tools |
| 115 | @mkdir -p $(PRIVATE_DIR)/repository/testcases |
| 116 | @mkdir -p $(PRIVATE_DIR)/repository/plans |
| 117 | # Copy executable to CTS directory |
| 118 | $(hide) $(ACP) -fp $(CTS_HOST_JAR) $(PRIVATE_DIR)/tools |
| 119 | $(hide) $(ACP) -fp $(CTS_EXECUTABLE_PATH) $(PRIVATE_DIR)/tools |
Brett Chabot | 67bae7f | 2009-06-26 14:41:30 -0700 | [diff] [blame] | 120 | # Copy junit jar |
| 121 | $(hide) $(ACP) -fp $(PRIVATE_JUNIT_HOST_JAR) $(PRIVATE_DIR)/tools |
Phil Dubach | 3b7521b | 2009-08-19 16:26:40 -0700 | [diff] [blame] | 122 | # Copy hosttestlib jar |
| 123 | $(hide) $(ACP) -fp $(HOSTTESTLIB_JAR) $(PRIVATE_DIR)/tools |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 124 | # Change mode of the executables |
| 125 | $(hide) chmod ug+rwX $(PRIVATE_DIR)/tools/$(notdir $(CTS_EXECUTABLE_PATH)) |
| 126 | $(foreach apk,$(CTS_CASE_LIST), \ |
| 127 | $(call copy-testcase-apk,$(apk))) |
Phil Dubach | 9e35a86 | 2009-05-11 11:00:16 -0700 | [diff] [blame] | 128 | # Copy CTS host config to CTS directory |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 129 | $(hide) $(ACP) -fp $(cts_tools_src_dir)/utils/host_config.xml $(PRIVATE_DIR)/repository/ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 130 | $(hide) touch $@ |
| 131 | |
Urs Grob | b3c6b2d | 2009-04-17 11:27:08 -0700 | [diff] [blame] | 132 | # Generate the test descriptions for the core-tests |
Phil Dubach | c539dbe | 2009-08-07 10:59:04 -0700 | [diff] [blame] | 133 | # Parameters: |
| 134 | # $1 : The output file where the description should be written (without the '.xml' extension) |
| 135 | # $2 : The AndroidManifest.xml corresponding to the test package |
| 136 | # $3 : The name of the TestSuite generator class to use |
| 137 | # $4 : The Android.mk corresponding to the test package (required for host-side tests only) |
Urs Grob | b3c6b2d | 2009-04-17 11:27:08 -0700 | [diff] [blame] | 138 | define generate-core-test-description |
| 139 | @echo "Generate core-test description ("$(notdir $(1))")" |
| 140 | $(hide) java $(PRIVATE_JAVAOPTS) \ |
| 141 | -classpath $(PRIVATE_CLASSPATH) \ |
| 142 | $(PRIVATE_PARAMS) CollectAllTests $(1) \ |
Phil Dubach | c539dbe | 2009-08-07 10:59:04 -0700 | [diff] [blame] | 143 | $(2) $(3) $(4) |
Urs Grob | b3c6b2d | 2009-04-17 11:27:08 -0700 | [diff] [blame] | 144 | endef |
The Android Open Source Project | 6a5f7f0 | 2009-03-05 14:34:30 -0800 | [diff] [blame] | 145 | |
| 146 | CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON) |
| 147 | TESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-tests,,COMMON) |
The Android Open Source Project | 6a5f7f0 | 2009-03-05 14:34:30 -0800 | [diff] [blame] | 148 | GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(TESTS_INTERMEDIATES)/classes.jar:$(CORE_INTERMEDIATES)/javalib.jar:$(TESTS_INTERMEDIATES)/javalib.jar:$(HOST_OUT_JAVA_LIBRARIES)/descGen.jar:$(HOST_JDK_TOOLS_JAR) |
| 149 | |
Urs Grob | b3c6b2d | 2009-04-17 11:27:08 -0700 | [diff] [blame] | 150 | $(cts_dir)/all_cts_core_files_stamp: PRIVATE_CLASSPATH:=$(GEN_CLASSPATH) |
| 151 | $(cts_dir)/all_cts_core_files_stamp: PRIVATE_JAVAOPTS:=-Xmx256M |
| 152 | $(cts_dir)/all_cts_core_files_stamp: PRIVATE_PARAMS:=-Dcts.useSuppliedTestResult=true |
| 153 | $(cts_dir)/all_cts_core_files_stamp: PRIVATE_PARAMS+=-Dcts.useEnhancedJunit=true |
The Android Open Source Project | 6a5f7f0 | 2009-03-05 14:34:30 -0800 | [diff] [blame] | 154 | # Why does this depend on javalib.jar instead of classes.jar? Because |
| 155 | # even though the tool will operate on the classes.jar files, the |
| 156 | # build system requires that dependencies use javalib.jar. If |
| 157 | # javalib.jar is up-to-date, then classes.jar is as well. Depending |
| 158 | # on classes.jar will build the files incorrectly. |
Phil Dubach | ccd2def | 2009-04-27 12:07:38 -0700 | [diff] [blame] | 159 | $(cts_dir)/all_cts_core_files_stamp: $(CTS_CORE_CASE_LIST) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(TESTS_INTERMEDIATES)/javalib.jar $(cts_dir)/all_cts_files_stamp | $(ACP) |
Urs Grob | b3c6b2d | 2009-04-17 11:27:08 -0700 | [diff] [blame] | 160 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.annotation,\ |
| 161 | cts/tests/core/annotation/AndroidManifest.xml,\ |
| 162 | tests.annotation.AllTests) |
| 163 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.archive,\ |
| 164 | cts/tests/core/archive/AndroidManifest.xml,\ |
| 165 | tests.archive.AllTests) |
| 166 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.concurrent,\ |
| 167 | cts/tests/core/concurrent/AndroidManifest.xml,\ |
| 168 | tests.concurrent.AllTests) |
| 169 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.crypto,\ |
| 170 | cts/tests/core/crypto/AndroidManifest.xml,\ |
| 171 | tests.crypto.AllTests) |
| 172 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.dom,\ |
| 173 | cts/tests/core/dom/AndroidManifest.xml,\ |
| 174 | tests.dom.AllTests) |
| 175 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.logging,\ |
| 176 | cts/tests/core/logging/AndroidManifest.xml,\ |
| 177 | tests.logging.AllTests) |
Urs Grob | b3c6b2d | 2009-04-17 11:27:08 -0700 | [diff] [blame] | 178 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.luni.io,\ |
| 179 | cts/tests/core/luni-io/AndroidManifest.xml,\ |
| 180 | tests.luni.AllTestsIo) |
| 181 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.luni.lang,\ |
| 182 | cts/tests/core/luni-lang/AndroidManifest.xml,\ |
| 183 | tests.luni.AllTestsLang) |
| 184 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.luni.net,\ |
| 185 | cts/tests/core/luni-net/AndroidManifest.xml,\ |
| 186 | tests.luni.AllTestsNet) |
| 187 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.luni.util,\ |
| 188 | cts/tests/core/luni-util/AndroidManifest.xml,\ |
| 189 | tests.luni.AllTestsUtil) |
| 190 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.math,\ |
| 191 | cts/tests/core/math/AndroidManifest.xml,\ |
| 192 | tests.math.AllTests) |
| 193 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.nio,\ |
| 194 | cts/tests/core/nio/AndroidManifest.xml,\ |
| 195 | tests.nio.AllTests) |
| 196 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.nio_char,\ |
| 197 | cts/tests/core/nio_char/AndroidManifest.xml,\ |
| 198 | tests.nio_char.AllTests) |
| 199 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.prefs,\ |
| 200 | cts/tests/core/prefs/AndroidManifest.xml,\ |
| 201 | tests.prefs.AllTests) |
| 202 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.regex,\ |
| 203 | cts/tests/core/regex/AndroidManifest.xml,\ |
| 204 | tests.regex.AllTests) |
| 205 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.security,\ |
| 206 | cts/tests/core/security/AndroidManifest.xml,\ |
| 207 | tests.security.AllTests) |
| 208 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.sql,\ |
| 209 | cts/tests/core/sql/AndroidManifest.xml,\ |
| 210 | tests.sql.AllTests) |
| 211 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.text,\ |
| 212 | cts/tests/core/text/AndroidManifest.xml,\ |
| 213 | tests.text.AllTests) |
| 214 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.xml,\ |
| 215 | cts/tests/core/xml/AndroidManifest.xml,\ |
| 216 | tests.xml.AllTests) |
| 217 | $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.xnet,\ |
| 218 | cts/tests/core/xnet/AndroidManifest.xml,\ |
| 219 | tests.xnet.AllTests) |
| 220 | $(hide) touch $@ |
The Android Open Source Project | 6a5f7f0 | 2009-03-05 14:34:30 -0800 | [diff] [blame] | 221 | |
| 222 | |
Urs Grob | b3c6b2d | 2009-04-17 11:27:08 -0700 | [diff] [blame] | 223 | # ----- Generate the test descriptions for the vm-tests ----- |
The Android Open Source Project | 6a5f7f0 | 2009-03-05 14:34:30 -0800 | [diff] [blame] | 224 | # |
Urs Grob | b3c6b2d | 2009-04-17 11:27:08 -0700 | [diff] [blame] | 225 | CORE_VM_TEST_DESC := $(cts_dir)/$(cts_name)/repository/testcases/android.core.vm-tests |
The Android Open Source Project | 6a5f7f0 | 2009-03-05 14:34:30 -0800 | [diff] [blame] | 226 | |
| 227 | VMTESTS_INTERMEDIATES :=$(call intermediates-dir-for,EXECUTABLES,vm-tests,1,) |
| 228 | # core tests only needed to get hold of junit-framework-classes |
| 229 | TESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-tests,,COMMON) |
| 230 | CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON) |
| 231 | |
| 232 | GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(TESTS_INTERMEDIATES)/classes.jar:$(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar:$(HOST_OUT_JAVA_LIBRARIES)/descGen.jar:$(HOST_JDK_TOOLS_JAR) |
| 233 | |
Urs Grob | b3c6b2d | 2009-04-17 11:27:08 -0700 | [diff] [blame] | 234 | $(CORE_VM_TEST_DESC): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH) |
| 235 | $(CORE_VM_TEST_DESC): PRIVATE_PARAMS:=-Dcts.useSuppliedTestResult=true |
| 236 | $(CORE_VM_TEST_DESC): PRIVATE_PARAMS+=-Dcts.useEnhancedJunit=true |
| 237 | $(CORE_VM_TEST_DESC): PRIVATE_JAVAOPTS:=-Xmx256M |
The Android Open Source Project | 6a5f7f0 | 2009-03-05 14:34:30 -0800 | [diff] [blame] | 238 | # Please see big comment above on why this line depends on javalib.jar instead of classes.jar |
Urs Grob | b3c6b2d | 2009-04-17 11:27:08 -0700 | [diff] [blame] | 239 | $(CORE_VM_TEST_DESC): vm-tests $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar $(TESTS_INTERMEDIATES)/javalib.jar $(cts_dir)/all_cts_files_stamp | $(ACP) |
| 240 | $(call generate-core-test-description,$(CORE_VM_TEST_DESC),\ |
| 241 | cts/tests/vm-tests/AndroidManifest.xml,\ |
| 242 | dot.junit.AllJunitHostTests, cts/tools/vm-tests/Android.mk) |
The Android Open Source Project | 6a5f7f0 | 2009-03-05 14:34:30 -0800 | [diff] [blame] | 243 | $(ACP) -fv $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar $(PRIVATE_DIR)/repository/testcases/android.core.vm-tests.jar |
| 244 | |
Phil Dubach | 3b7521b | 2009-08-19 16:26:40 -0700 | [diff] [blame] | 245 | # Move app security host-side tests to the repository |
| 246 | APP_SECURITY_LIB := $(cts_dir)/$(cts_name)/repository/testcases/CtsAppSecurityTests.jar |
| 247 | |
Phil Dubach | 793817b | 2009-08-24 14:18:15 -0700 | [diff] [blame] | 248 | $(APP_SECURITY_LIB): $(HOST_OUT_JAVA_LIBRARIES)/CtsAppSecurityTests.jar $(cts_dir)/all_cts_files_stamp $(ACP) |
Phil Dubach | 3b7521b | 2009-08-19 16:26:40 -0700 | [diff] [blame] | 249 | $(ACP) -fv $(HOST_OUT_JAVA_LIBRARIES)/CtsAppSecurityTests.jar $(APP_SECURITY_LIB) |
| 250 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 251 | # Generate the default test plan for User. |
Phil Dubach | 5e3ab04 | 2009-08-14 13:48:34 -0700 | [diff] [blame] | 252 | # Usage: buildCts.py <testRoot> <ctsOutputDir> <tempDir> <androidRootDir> <docletPath> |
Phil Dubach | 3b7521b | 2009-08-19 16:26:40 -0700 | [diff] [blame] | 253 | $(DEFAULT_TEST_PLAN): $(cts_dir)/all_cts_files_stamp $(cts_dir)/all_cts_core_files_stamp $(cts_tools_src_dir)/utils/buildCts.py $(CORE_VM_TEST_DESC) $(APP_SECURITY_LIB) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar |
Phil Dubach | 5e3ab04 | 2009-08-14 13:48:34 -0700 | [diff] [blame] | 254 | $(hide) $(cts_tools_src_dir)/utils/buildCts.py cts/tests/tests/ $(PRIVATE_DIR) $(TMP_DIR) \ |
| 255 | $(TOP) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 256 | |
| 257 | # Package CTS and clean up. |
| 258 | # |
| 259 | # TODO: |
| 260 | # Pack cts.bat into the same zip file as well. See http://buganizer/issue?id=1656821 for more details |
| 261 | INTERNAL_CTS_TARGET := $(cts_dir)/$(cts_name).zip |
| 262 | $(INTERNAL_CTS_TARGET): PRIVATE_NAME := $(cts_name) |
| 263 | $(INTERNAL_CTS_TARGET): PRIVATE_CTS_DIR := $(cts_dir) |
| 264 | $(INTERNAL_CTS_TARGET): PRIVATE_DIR := $(cts_dir)/$(cts_name) |
| 265 | $(INTERNAL_CTS_TARGET): TMP_DIR := $(cts_dir)/temp |
Urs Grob | b3c6b2d | 2009-04-17 11:27:08 -0700 | [diff] [blame] | 266 | $(INTERNAL_CTS_TARGET): $(cts_dir)/all_cts_files_stamp $(DEFAULT_TEST_PLAN) $(CORE_VM_TEST_DESC) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 267 | @echo "Package CTS: $@" |
| 268 | $(hide) cd $(dir $@) && zip -rq $(notdir $@) $(PRIVATE_NAME) |
| 269 | |
| 270 | .PHONY: cts |
| 271 | cts: $(INTERNAL_CTS_TARGET) adb |
| 272 | $(call dist-for-goals,cts,$(INTERNAL_CTS_TARGET)) |
| 273 | |
| 274 | define copy-testcase-apk |
| 275 | |
| 276 | $(hide) $(ACP) -fp $(call intermediates-dir-for,APPS,$(1))/package.apk \ |
| 277 | $(PRIVATE_DIR)/repository/testcases/$(1).apk |
| 278 | |
| 279 | endef |