Android.mk revision 6674f8ae6bb390e61cfdccb6e5825ac952584f2d
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 16LOCAL_PATH := $(call my-dir) 17 18TEST_ART_RUN_TEST_MAKE_TARGETS := 19 20# Helper to create individual build targets for tests. 21# Must be called with $(eval) 22# $(1): the test number 23define declare-make-art-run-test 24dmart_target := $(TARGET_OUT_DATA)/art-run-tests/$(1)/touch 25$$(dmart_target): $(DX) $(HOST_OUT_EXECUTABLES)/jasmin 26 $(hide) rm -rf $$(dir $$@) && mkdir -p $$(dir $$@) 27 $(hide) DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) $(LOCAL_PATH)/run-test --build-only --output-path $$(abspath $$(dir $$@)) $(1) 28 $(hide) touch $$@ 29 30TEST_ART_RUN_TEST_MAKE_TARGETS += $$(dmart_target) 31dmart_target := 32endef 33 34# Expand all tests. 35$(foreach test, $(wildcard art/test/[0-9]*), $(eval $(call declare-make-art-run-test,$(notdir $(test))))) 36 37include $(CLEAR_VARS) 38LOCAL_MODULE_TAGS := tests 39LOCAL_MODULE := art-run-tests 40LOCAL_ADDITIONAL_DEPENDENCIES := $(TEST_ART_RUN_TEST_MAKE_TARGETS) 41include $(BUILD_PHONY_PACKAGE) 42 43# clear temp vars 44TEST_ART_RUN_TEST_MAKE_TARGETS := 45declare-make-art-run-test := 46