aboutsummaryrefslogtreecommitdiff
path: root/core/tasks/cts.mk
blob: 7c237a310ef7d0ad263d17258c3def61a5af1272 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
# 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.

test_suite_name := cts
test_suite_tradefed := cts-tradefed
test_suite_dynamic_config := cts/tools/cts-tradefed/DynamicConfig.xml
test_suite_readme := cts/tools/cts-tradefed/README
test_suite_tools := $(HOST_OUT_JAVA_LIBRARIES)/ats_console_deploy.jar \
  $(HOST_OUT_JAVA_LIBRARIES)/ats_olc_server_local_mode_deploy.jar

$(call declare-1p-target,$(test_suite_dynamic_config),cts)
$(call declare-1p-target,$(test_suite_readme),cts)

include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk

.PHONY: cts
cts: $(compatibility_zip) $(compatibility_tests_list_zip)
$(call dist-for-goals, cts, $(compatibility_zip) $(compatibility_tests_list_zip))

.PHONY: cts_v2
cts_v2: cts

# platform version check (b/32056228)
# ============================================================
ifneq (,$(wildcard cts/))
  cts_platform_version_path := cts/tests/tests/os/assets/platform_versions.txt
  cts_platform_version_string := $(shell cat $(cts_platform_version_path))
  cts_platform_release_path := cts/tests/tests/os/assets/platform_releases.txt
  cts_platform_release_string := $(shell cat $(cts_platform_release_path))

  ifneq (REL,$(PLATFORM_VERSION_CODENAME))
    ifeq (,$(findstring $(PLATFORM_VERSION),$(cts_platform_version_string)))
      define error_msg
        ============================================================
        Could not find version "$(PLATFORM_VERSION)" in CTS platform version file:
        $(cts_platform_version_path)
        Most likely PLATFORM_VERSION in build/core/version_defaults.mk
        has changed and a new version must be added to this CTS file.
        ============================================================
      endef
      $(error $(error_msg))
    endif
  endif
  ifeq (,$(findstring $(PLATFORM_VERSION_LAST_STABLE),$(cts_platform_release_string)))
    define error_msg
      ============================================================
      Could not find version "$(PLATFORM_VERSION_LAST_STABLE)" in CTS platform release file:
      $(cts_platform_release_path)
      Most likely PLATFORM_VERSION_LAST_STABLE in build/core/version_defaults.mk
      has changed and a new version must be added to this CTS file.
      ============================================================
    endef
    $(error $(error_msg))
  endif
endif

# Creates a "cts-verifier" directory that will contain:
#
# 1. Out directory with a "android-cts-verifier" containing the CTS Verifier
#    and other binaries it needs.
#
# 2. Zipped version of the android-cts-verifier directory to be included with
#    the build distribution.
##
cts-dir := $(HOST_OUT)/cts-verifier
verifier-dir-name := android-cts-verifier
verifier-dir := $(cts-dir)/$(verifier-dir-name)
verifier-zip-name := $(verifier-dir-name).zip
verifier-zip := $(cts-dir)/$(verifier-zip-name)
cts-v-host-zip := $(HOST_OUT)/cts-v-host/android-cts-v-host.zip

cts : $(verifier-zip)
ifeq ($(wildcard cts/tools/cts-v-host/README),)
$(verifier-zip): PRIVATE_DIR := $(cts-dir)
$(verifier-zip): $(SOONG_ANDROID_CTS_VERIFIER_ZIP)
	rm -rf $(PRIVATE_DIR)
	mkdir -p $(PRIVATE_DIR)
	unzip -q -d $(PRIVATE_DIR) $<
	$(copy-file-to-target)
else
$(verifier-zip): PRIVATE_DIR := $(cts-dir)
$(verifier-zip): PRIVATE_verifier_dir := $(verifier-dir)
$(verifier-zip): PRIVATE_host_zip := $(cts-v-host-zip)
$(verifier-zip): $(SOONG_ANDROID_CTS_VERIFIER_ZIP) $(cts-v-host-zip) $(SOONG_ZIP)
	rm -rf $(PRIVATE_DIR)
	mkdir -p $(PRIVATE_DIR)
	unzip -q -d $(PRIVATE_DIR) $<
	unzip -q -d $(PRIVATE_verifier_dir) $(PRIVATE_host_zip)
	$(SOONG_ZIP) -d -o $@ -C $(PRIVATE_DIR) -D $(PRIVATE_verifier_dir)
endif
$(call dist-for-goals, cts, $(verifier-zip))

cts_files_metadata := $(HOST_OUT)/cts/cts_files_metadata.textproto
file_metadata_generation_tool := $(HOST_OUT_EXECUTABLES)/file_metadata_generation$(HOST_EXECUTABLE_SUFFIX)
aapt2_tool := $(HOST_OUT_EXECUTABLES)/aapt2$(HOST_EXECUTABLE_SUFFIX)
$(cts_files_metadata): PRIVATE_TESTCASES_DIR := $(HOST_OUT)/cts/android-cts/testcases
$(cts_files_metadata): PRIVATE_AAPT2_TOOL := $(aapt2_tool)
$(cts_files_metadata): PRIVATE_METADATA_TOOL := $(file_metadata_generation_tool)
$(cts_files_metadata): PRIVATE_SDK_VERSION := $(PLATFORM_SDK_VERSION)
$(cts_files_metadata): $(file_metadata_generation_tool) $(aapt2_tool) $(compatibility_zip)
	$(PRIVATE_METADATA_TOOL) --testcases_dir $(PRIVATE_TESTCASES_DIR)\
	--aapt2 $(PRIVATE_AAPT2_TOOL) --sdk_version $(PRIVATE_SDK_VERSION) --output $@

ALL_TARGETS.$(cts_files_metadata).META_LIC:=$(module_license_metadata)
$(call dist-for-goals, cts-api-coverage, $(cts_files_metadata))

# For producing CTS coverage reports.
# Run "make cts-test-coverage" in the $ANDROID_BUILD_TOP directory.

cts_api_coverage_exe := $(HOST_OUT_EXECUTABLES)/cts-api-coverage
dexdeps_exe := $(HOST_OUT_EXECUTABLES)/dexdeps
cts_api_map_exe := $(HOST_OUT_EXECUTABLES)/cts-api-map

coverage_out := $(HOST_OUT)/cts-api-coverage
api_map_out := $(HOST_OUT)/cts-api-map

cts_jar_files := $(api_map_out)/cts_jar_files.txt
cts_v_host_jar_files := $(api_map_out)/cts_v_host_jar_files.txt
cts_all_jar_files := $(api_map_out)/cts_all_jar_files.txt

$(cts_jar_files): PRIVATE_API_MAP_FILES := $(sort $(COMPATIBILITY.cts.API_MAP_FILES))
$(cts_jar_files):
	mkdir -p $(dir $@)
	echo $(PRIVATE_API_MAP_FILES) > $@

$(cts_v_host_jar_files): PRIVATE_API_MAP_FILES := $(sort $(COMPATIBILITY.cts-v-host.API_MAP_FILES))
$(cts_v_host_jar_files): $(SOONG_ANDROID_CTS_VERIFIER_APP_LIST)
	mkdir -p $(dir $@)
	cp $< $@
	echo $(PRIVATE_API_MAP_FILES) >> $@

$(cts_all_jar_files): PRIVATE_API_MAP_FILES := $(sort $(COMPATIBILITY.cts.API_MAP_FILES) \
                                                      $(COMPATIBILITY.cts-v-host.API_MAP_FILES))
$(cts_all_jar_files): $(SOONG_ANDROID_CTS_VERIFIER_APP_LIST)
	mkdir -p $(dir $@)
	cp $< $@
	echo $(PRIVATE_API_MAP_FILES) >> $@

api_xml_description := $(TARGET_OUT_COMMON_INTERMEDIATES)/api.xml

napi_text_description := cts/tools/cts-api-coverage/etc/ndk-api.xml
napi_xml_description := $(coverage_out)/ndk-api.xml
$(napi_xml_description) : $(napi_text_description) $(ACP)
		$(hide) echo "Preparing NDK API XML: $@"
		$(hide) mkdir -p $(dir $@)
		$(hide) $(ACP)  $< $@

system_api_xml_description := $(TARGET_OUT_COMMON_INTERMEDIATES)/system-api.xml
module_lib_api_xml_description := $(TARGET_OUT_COMMON_INTERMEDIATES)/module-lib-api.xml
system_service_api_description := $(TARGET_OUT_COMMON_INTERMEDIATES)/system-server-api.xml

combined_api_xml_description := $(api_xml_description) \
  $(system_api_xml_description) \
  $(module_lib_api_xml_description) \
  $(system_service_api_description)

cts-test-coverage-report := $(coverage_out)/test-coverage.html
cts-system-api-coverage-report := $(coverage_out)/system-api-coverage.html
cts-system-api-xml-coverage-report := $(coverage_out)/system-api-coverage.xml
cts-verifier-coverage-report := $(coverage_out)/verifier-coverage.html
cts-combined-coverage-report := $(coverage_out)/combined-coverage.html
cts-combined-xml-coverage-report := $(coverage_out)/combined-coverage.xml

cts_api_coverage_dependencies := $(cts_api_coverage_exe) $(dexdeps_exe) $(api_xml_description) $(napi_xml_description)
cts_system_api_coverage_dependencies := $(cts_api_coverage_exe) $(dexdeps_exe) $(system_api_xml_description)

cts-api-map-xml-report := $(api_map_out)/cts-api-map.xml
cts-v-host-api-map-xml-report := $(api_map_out)/cts-v-host-api-map.xml
cts-combined-api-map-xml-report := $(api_map_out)/cts-combined-api-map.xml
cts-combined-api-map-html-report := $(api_map_out)/cts-combined-api-map.html
cts-combined-api-inherit-xml-report := $(api_map_out)/cts-combined-api-inherit.xml

cts_api_map_dependencies := $(cts_api_map_exe) $(combined_api_xml_description) $(cts_jar_files)
cts_v_host_api_map_dependencies := $(cts_api_map_exe) $(combined_api_xml_description) $(cts_v_host_jar_files)
cts_combined_api_map_dependencies := $(cts_api_map_exe) $(combined_api_xml_description) $(cts_all_jar_files)

android_cts_zip := $(HOST_OUT)/cts/android-cts.zip
cts_verifier_apk := $(call intermediates-dir-for,APPS,CtsVerifier)/package.apk

$(cts-test-coverage-report): PRIVATE_TEST_CASES := $(COMPATIBILITY_TESTCASES_OUT_cts)
$(cts-test-coverage-report): PRIVATE_CTS_API_COVERAGE_EXE := $(cts_api_coverage_exe)
$(cts-test-coverage-report): PRIVATE_DEXDEPS_EXE := $(dexdeps_exe)
$(cts-test-coverage-report): PRIVATE_API_XML_DESC := $(api_xml_description)
$(cts-test-coverage-report): PRIVATE_NAPI_XML_DESC := $(napi_xml_description)
$(cts-test-coverage-report) : $(android_cts_zip) $(cts_api_coverage_dependencies) | $(ACP)
	$(call generate-coverage-report-cts,"CTS Tests API-NDK Coverage Report",\
			$(PRIVATE_TEST_CASES),html)

$(cts-system-api-coverage-report): PRIVATE_TEST_CASES := $(COMPATIBILITY_TESTCASES_OUT_cts)
$(cts-system-api-coverage-report): PRIVATE_CTS_API_COVERAGE_EXE := $(cts_api_coverage_exe)
$(cts-system-api-coverage-report): PRIVATE_DEXDEPS_EXE := $(dexdeps_exe)
$(cts-system-api-coverage-report): PRIVATE_API_XML_DESC := $(system_api_xml_description)
$(cts-system-api-coverage-report): PRIVATE_NAPI_XML_DESC := ""
$(cts-system-api-coverage-report) : $(android_cts_zip) $(cts_system_api_coverage_dependencies) | $(ACP)
	$(call generate-coverage-report-cts,"CTS System API Coverage Report",\
			$(PRIVATE_TEST_CASES),html)

$(cts-system-api-xml-coverage-report): PRIVATE_TEST_CASES := $(COMPATIBILITY_TESTCASES_OUT_cts)
$(cts-system-api-xml-coverage-report): PRIVATE_CTS_API_COVERAGE_EXE := $(cts_api_coverage_exe)
$(cts-system-api-xml-coverage-report): PRIVATE_DEXDEPS_EXE := $(dexdeps_exe)
$(cts-system-api-xml-coverage-report): PRIVATE_API_XML_DESC := $(system_api_xml_description)
$(cts-system-api-xml-coverage-report): PRIVATE_NAPI_XML_DESC := ""
$(cts-system-api-xml-coverage-report) : $(android_cts_zip) $(cts_system_api_coverage_dependencies) | $(ACP)
	$(call generate-coverage-report-cts,"CTS System API Coverage Report - XML",\
			$(PRIVATE_TEST_CASES),xml)

$(cts-verifier-coverage-report): PRIVATE_TEST_CASES := $(foreach c, $(cts_verifier_apk) $(verifier-dir), $(c))
$(cts-verifier-coverage-report): PRIVATE_CTS_API_COVERAGE_EXE := $(cts_api_coverage_exe)
$(cts-verifier-coverage-report): PRIVATE_DEXDEPS_EXE := $(dexdeps_exe)
$(cts-verifier-coverage-report): PRIVATE_API_XML_DESC := $(api_xml_description)
$(cts-verifier-coverage-report): PRIVATE_NAPI_XML_DESC := $(napi_xml_description)
$(cts-verifier-coverage-report) : $(cts_verifier_apk) $(verifier-zip) $(cts_api_coverage_dependencies) | $(ACP)
	$(call generate-coverage-report-cts,"CTS Verifier API Coverage Report",\
			$(PRIVATE_TEST_CASES),html)

$(cts-combined-coverage-report): PRIVATE_TEST_CASES := $(foreach c, $(cts_verifier_apk) $(COMPATIBILITY_TESTCASES_OUT_cts) $(verifier-dir), $(c))
$(cts-combined-coverage-report): PRIVATE_CTS_API_COVERAGE_EXE := $(cts_api_coverage_exe)
$(cts-combined-coverage-report): PRIVATE_DEXDEPS_EXE := $(dexdeps_exe)
$(cts-combined-coverage-report): PRIVATE_API_XML_DESC := $(api_xml_description)
$(cts-combined-coverage-report): PRIVATE_NAPI_XML_DESC := $(napi_xml_description)
$(cts-combined-coverage-report) : $(android_cts_zip) $(cts_verifier_apk) $(verifier-zip) $(cts_api_coverage_dependencies) | $(ACP)
	$(call generate-coverage-report-cts,"CTS Combined API Coverage Report",\
			$(PRIVATE_TEST_CASES),html)

$(cts-combined-xml-coverage-report): PRIVATE_TEST_CASES := $(foreach c, $(cts_verifier_apk) $(COMPATIBILITY_TESTCASES_OUT_cts) $(verifier-dir), $(c))
$(cts-combined-xml-coverage-report): PRIVATE_CTS_API_COVERAGE_EXE := $(cts_api_coverage_exe)
$(cts-combined-xml-coverage-report): PRIVATE_DEXDEPS_EXE := $(dexdeps_exe)
$(cts-combined-xml-coverage-report): PRIVATE_API_XML_DESC := $(api_xml_description)
$(cts-combined-xml-coverage-report): PRIVATE_NAPI_XML_DESC := $(napi_xml_description)
$(cts-combined-xml-coverage-report) : $(android_cts_zip) $(cts_verifier_apk) $(verifier-zip) $(cts_api_coverage_dependencies) | $(ACP)
	$(call generate-coverage-report-cts,"CTS Combined API Coverage Report - XML",\
			$(PRIVATE_TEST_CASES),xml)

.PHONY: cts-test-coverage
cts-test-coverage : $(cts-test-coverage-report)

.PHONY: cts-system-api-coverage
cts-system-api-coverage : $(cts-system-api-coverage-report)

.PHONY: cts-system-api-xml-coverage
cts-system-api-xml-coverage : $(cts-system-api-xml-coverage-report)

.PHONY: cts-verifier-coverage
cts-verifier-coverage : $(cts-verifier-coverage-report)

.PHONY: cts-combined-coverage
cts-combined-coverage : $(cts-combined-coverage-report)

.PHONY: cts-combined-xml-coverage
cts-combined-xml-coverage : $(cts-combined-xml-coverage-report)

.PHONY: cts-coverage-report-all cts-api-coverage
cts-coverage-report-all: cts-test-coverage cts-verifier-coverage cts-combined-coverage cts-combined-xml-coverage

$(cts-api-map-xml-report): PRIVATE_CTS_API_MAP_EXE := $(cts_api_map_exe)
$(cts-api-map-xml-report): PRIVATE_API_XML_DESC := $(combined_api_xml_description)
$(cts-api-map-xml-report): PRIVATE_JAR_FILES := $(cts_jar_files)
$(cts-api-map-xml-report) : $(android_cts_zip) $(cts_api_map_dependencies) | $(ACP)
	$(call generate-api-map-report-cts,"CTS API MAP Report - XML",\
			$(PRIVATE_JAR_FILES),xml)

$(cts-v-host-api-map-xml-report): PRIVATE_CTS_API_MAP_EXE := $(cts_api_map_exe)
$(cts-v-host-api-map-xml-report): PRIVATE_API_XML_DESC := $(combined_api_xml_description)
$(cts-v-host-api-map-xml-report): PRIVATE_JAR_FILES := $(cts_v_host_jar_files)
$(cts-v-host-api-map-xml-report) : $(verifier_zip) $(cts_v_host_api_map_dependencies) | $(ACP)
	$(call generate-api-map-report-cts,"CTS-V-HOST API MAP Report - XML",\
			$(PRIVATE_JAR_FILES),xml)

$(cts-combined-api-map-xml-report): PRIVATE_CTS_API_MAP_EXE := $(cts_api_map_exe)
$(cts-combined-api-map-xml-report): PRIVATE_API_XML_DESC := $(combined_api_xml_description)
$(cts-combined-api-map-xml-report): PRIVATE_JAR_FILES := $(cts_all_jar_files)
$(cts-combined-api-map-xml-report) : $(verifier_zip) $(android_cts_zip) $(cts_combined_api_map_dependencies) | $(ACP)
	$(call generate-api-map-report-cts,"CTS Combined API MAP Report - XML",\
			$(PRIVATE_JAR_FILES),xml)

$(cts-combined-api-map-html-report): PRIVATE_CTS_API_MAP_EXE := $(cts_api_map_exe)
$(cts-combined-api-map-html-report): PRIVATE_API_XML_DESC := $(combined_api_xml_description)
$(cts-combined-api-map-html-report): PRIVATE_JAR_FILES := $(cts_all_jar_files)
$(cts-combined-api-map-html-report) : $(verifier_zip) $(android_cts_zip) $(cts_combined_api_map_dependencies) | $(ACP)
	$(call generate-api-map-report-cts,"CTS Combined API MAP Report - HTML",\
			$(PRIVATE_JAR_FILES),html)

$(cts-combined-api-inherit-xml-report): PRIVATE_CTS_API_MAP_EXE := $(cts_api_map_exe)
$(cts-combined-api-inherit-xml-report): PRIVATE_API_XML_DESC := $(combined_api_xml_description)
$(cts-combined-api-inherit-xml-report): PRIVATE_JAR_FILES := $(cts_all_jar_files)
$(cts-combined-api-inherit-xml-report) : $(verifier_zip) $(android_cts_zip) $(cts_combined_api_map_dependencies) | $(ACP)
	$(call generate-api-inherit-report-cts,"CTS Combined API Inherit Report - XML",\
			$(PRIVATE_JAR_FILES),xml)

.PHONY: cts-api-map-xml
cts-api-map-xml : $(cts-api-map-xml-report)

.PHONY: cts-v-host-api-map-xml
cts-v-host-api-map-xml: $(cts-v-host-api-map-xml-report)

.PHONY: cts-combined-api-map-xml
cts-combined-api-map-xml : $(cts-combined-api-map-xml-report)

.PHONY: cts-combined-api-inherit-xml
cts-combined-api-inherit-xml : $(cts-combined-api-inherit-xml-report)

ALL_TARGETS.$(cts-test-coverage-report).META_LIC:=$(module_license_metadata)
ALL_TARGETS.$(cts-system-api-coverage-report).META_LIC:=$(module_license_metadata)
ALL_TARGETS.$(cts-system-api-xml-coverage-report).META_LIC:=$(module_license_metadata)
ALL_TARGETS.$(cts-verifier-coverage-report).META_LIC:=$(module_license_metadata)
ALL_TARGETS.$(cts-combined-coverage-report).META_LIC:=$(module_license_metadata)
ALL_TARGETS.$(cts-combined-xml-coverage-report).META_LIC:=$(module_license_metadata)

# Put the test api map report in the dist dir if "cts-api-coverage" is among the build goals.
$(call dist-for-goals, cts-api-coverage, $(cts-combined-api-map-xml-report):cts-api-map-report.xml)
$(call dist-for-goals, cts-api-coverage, $(cts-combined-api-inherit-xml-report):cts-api-inherit-report.xml)

ALL_TARGETS.$(cts-api-map-xml-report).META_LIC:=$(module_license_metadata)
ALL_TARGETS.$(cts-v-host-api-map-xml-report).META_LIC:=$(module_license_metadata)
ALL_TARGETS.$(cts-combined-api-map-xml-report).META_LIC:=$(module_license_metadata)
ALL_TARGETS.$(cts-combined-api-map-html-report).META_LIC:=$(module_license_metadata)
ALL_TARGETS.$(cts-combined-api-map-inherit-report).META_LIC:=$(module_license_metadata)

# Arguments;
#  1 - Name of the report printed out on the screen
#  2 - List of apk files that will be scanned to generate the report
#  3 - Format of the report
define generate-coverage-report-cts
	$(hide) mkdir -p $(dir $@)
	$(hide) $(PRIVATE_CTS_API_COVERAGE_EXE) -j 8 -d $(PRIVATE_DEXDEPS_EXE) -a $(PRIVATE_API_XML_DESC) -n $(PRIVATE_NAPI_XML_DESC) -f $(3) -o $@ $(2)
	@ echo $(1): file://$$(cd $(dir $@); pwd)/$(notdir $@)
endef

# Arguments;
#  1 - Name of the report printed out on the screen
#  2 - A file containing list of files that to be analyzed
#  3 - Format of the report
define generate-api-map-report-cts
	$(hide) mkdir -p $(dir $@)
	$(hide) $(PRIVATE_CTS_API_MAP_EXE) -j 8 -m api_map -m xts_annotation -a $(shell echo "$(PRIVATE_API_XML_DESC)" | tr ' ' ',') -i $(2) -f $(3) -o $@
	@ echo $(1): file://$$(cd $(dir $@); pwd)/$(notdir $@)
endef


# Arguments;
#  1 - Name of the report printed out on the screen
#  2 - A file containing list of files that to be analyzed
#  3 - Format of the report
define generate-api-inherit-report-cts
	$(hide) mkdir -p $(dir $@)
	$(hide) $(PRIVATE_CTS_API_MAP_EXE) -j 8 -m xts_api_inherit -a $(shell echo "$(PRIVATE_API_XML_DESC)" | tr ' ' ',') -i $(2) -f $(3) -o $@
	@ echo $(1): file://$$(cd $(dir $@); pwd)/$(notdir $@)
endef

# Reset temp vars
cts_api_coverage_dependencies :=
cts_system_api_coverage_dependencies :=
cts_api_map_dependencies :=
cts_v_host_api_map_dependencies :=
cts_combined_api_map_dependencies :=
cts-combined-coverage-report :=
cts-combined-xml-coverage-report :=
cts-verifier-coverage-report :=
cts-test-coverage-report :=
cts-system-api-coverage-report :=
cts-system-api-xml-coverage-report :=
cts-api-map-xml-report :=
cts-v-host-api-map-xml-report :=
cts-combined-api-map-xml-report :=
cts-combined-api-map-html-report :=
cts-combined-api-map-inherit-report :=
api_xml_description :=
api_text_description :=
system_api_xml_description :=
combined_api_xml_description :=
napi_xml_description :=
napi_text_description :=
coverage_out :=
api_map_out :=
cts_jar_files :=
dexdeps_exe :=
cts_api_coverage_exe :=
cts_api_map_exe :=
cts_verifier_apk :=
android_cts_zip :=
cts-dir :=
verifier-dir-name :=
verifier-dir :=
verifier-zip-name :=
verifier-zip :=
cts-v-host-zip :=
cts_files_metadata :=
file_metadata_generation_tool :=
aapt2_tool :=