blob: e4b8281039aae4127de25136b0882db90e2bdb18 [file] [log] [blame]
Jarkko Pöyry59a8dbb2014-10-13 22:01:15 -07001# Copyright (C) 2012 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#
16# Builds dEQP test description XMLs needed by CTS.
17#
18
19CTS_DEQP_CONFIG_PATH := $(call my-dir)
20
21cts_library_xml := $(CTS_TESTCASES_OUT)/com.drawelements.deqp.$(DEQP_API).xml
Jarkko Pöyry59a8dbb2014-10-13 22:01:15 -070022$(cts_library_xml): MUSTPASS_XML_FILE := external/deqp/android/cts/com.drawelements.deqp.$(DEQP_API).xml
23$(cts_library_xml): PRIVATE_TEST_NAME := $(DEQP_TEST_NAME)
24$(cts_library_xml): PRIVATE_TEST_PACKAGE := com.drawelements.deqp.$(DEQP_API)
25$(cts_library_xml): PRIVATE_DUMMY_CASELIST := $(CTS_DEQP_CONFIG_PATH)/deqp_dummy_test_list
Stuart Scott0337dbf2015-02-04 10:37:07 -080026$(cts_library_xml): external/deqp/android/cts/com.drawelements.deqp.$(DEQP_API).xml $(CTS_EXPECTATIONS) $(CTS_UNSUPPORTED_ABIS) $(CTS_XML_GENERATOR)
Jarkko Pöyry59a8dbb2014-10-13 22:01:15 -070027 $(hide) echo Generating test description for $(PRIVATE_TEST_NAME)
28 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
29
30# Query build ABIs by routing a dummy test list through xml generator and parse result
31 $(hide) $(eval supported_abi_attr := $(shell $(CTS_XML_GENERATOR) -t dummyTest \
32 -n dummyName \
33 -p invalid.dummy \
34 -e $(CTS_EXPECTATIONS) \
35 -b $(CTS_UNSUPPORTED_ABIS) \
36 -a $(CTS_TARGET_ARCH) \
37 < $(PRIVATE_DUMMY_CASELIST) \
38 | grep --only-matching -e " abis=\"[^\"]*\""))
39
40# Patch xml caselist with supported abi
Jarkko Pöyry91d00e02015-01-15 18:02:15 -080041 $(hide) $(SED_EXTENDED) -e 's:^<Test ((.[^/]|[^/])*)(/?)>$$:<Test \1 $(supported_abi_attr) \3>:' \
Jarkko Pöyry59a8dbb2014-10-13 22:01:15 -070042 < $(MUSTPASS_XML_FILE) \
43 > $@