Jarkko Pöyry | 59a8dbb | 2014-10-13 22:01:15 -0700 | [diff] [blame] | 1 | # 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 | |
| 19 | CTS_DEQP_CONFIG_PATH := $(call my-dir) |
| 20 | |
Kalle Raita | 953ab3a | 2015-10-05 16:21:19 -0700 | [diff] [blame^] | 21 | cts_library_xmls:=$(foreach xml_file, $(call find-files-in-subdirs, external/deqp/android/cts/master, 'com.drawelements.deqp.$(DEQP_API).*xml', .), $(CTS_TESTCASES_OUT)/$(xml_file)) |
| 22 | $(cts_library_xmls) : PRIVATE_API := $(DEQP_API) |
| 23 | $(cts_library_xmls) : PRIVATE_TEST_NAME := $(DEQP_TEST_NAME) |
| 24 | $(cts_library_xmls) : PRIVATE_TEST_PACKAGE := com.drawelements.deqp.$(DEQP_API) |
| 25 | $(cts_library_xmls) : PRIVATE_DUMMY_CASELIST := $(CTS_DEQP_CONFIG_PATH)/deqp_dummy_test_list |
| 26 | $(cts_library_xmls) : $(CTS_TESTCASES_OUT)/%.xml: external/deqp/android/cts/master/%.xml $(CTS_EXPECTATIONS) $(CTS_UNSUPPORTED_ABIS) $(CTS_XML_GENERATOR) |
| 27 | $(hide) echo Generating test description $@ |
Jarkko Pöyry | 59a8dbb | 2014-10-13 22:01:15 -0700 | [diff] [blame] | 28 | $(hide) mkdir -p $(CTS_TESTCASES_OUT) |
Jarkko Pöyry | 59a8dbb | 2014-10-13 22:01:15 -0700 | [diff] [blame] | 29 | # Query build ABIs by routing a dummy test list through xml generator and parse result |
| 30 | $(hide) $(eval supported_abi_attr := $(shell $(CTS_XML_GENERATOR) -t dummyTest \ |
| 31 | -n dummyName \ |
| 32 | -p invalid.dummy \ |
| 33 | -e $(CTS_EXPECTATIONS) \ |
| 34 | -b $(CTS_UNSUPPORTED_ABIS) \ |
| 35 | -a $(CTS_TARGET_ARCH) \ |
| 36 | < $(PRIVATE_DUMMY_CASELIST) \ |
| 37 | | grep --only-matching -e " abis=\"[^\"]*\"")) |
Jarkko Pöyry | 59a8dbb | 2014-10-13 22:01:15 -0700 | [diff] [blame] | 38 | # Patch xml caselist with supported abi |
Pyry Haulos | dfda5fd | 2015-04-03 10:40:12 -0700 | [diff] [blame] | 39 | $(hide) $(SED_EXTENDED) -e 's:^(\s*)<Test ((.[^/]|[^/])*)(/?)>$$:\1<Test \2 $(supported_abi_attr)\4>:' \ |
Kalle Raita | 953ab3a | 2015-10-05 16:21:19 -0700 | [diff] [blame^] | 40 | < $< \ |
Jarkko Pöyry | 59a8dbb | 2014-10-13 22:01:15 -0700 | [diff] [blame] | 41 | > $@ |