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