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