Carl Shapiro | 7b21670 | 2011-06-17 15:09:26 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2011 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | LOCAL_PATH := $(call my-dir) |
| 18 | include $(CLEAR_VARS) |
| 19 | |
Carl Shapiro | 0e6d197 | 2011-07-06 19:17:39 -0700 | [diff] [blame] | 20 | build_path := $(LOCAL_PATH)/build |
Brian Carlstrom | cdc8de4 | 2011-07-19 14:23:17 -0700 | [diff] [blame] | 21 | include $(build_path)/Android.common.mk |
| 22 | |
Carl Shapiro | 0e6d197 | 2011-07-06 19:17:39 -0700 | [diff] [blame] | 23 | include $(build_path)/Android.libart.mk |
Carl Shapiro | 0e6d197 | 2011-07-06 19:17:39 -0700 | [diff] [blame] | 24 | include $(build_path)/Android.aexec.mk |
Carl Shapiro | 7b21670 | 2011-06-17 15:09:26 -0700 | [diff] [blame] | 25 | |
Brian Carlstrom | 07d579f | 2011-07-27 13:31:51 -0700 | [diff] [blame] | 26 | include $(build_path)/Android.libarttest.mk |
| 27 | include $(build_path)/Android.test.mk |
Brian Carlstrom | 934486c | 2011-07-12 23:42:50 -0700 | [diff] [blame] | 28 | |
| 29 | # "m build-art" for quick minimal build |
| 30 | .PHONY: build-art |
| 31 | build-art: \ |
| 32 | $(TARGET_OUT_EXECUTABLES)/aexec \ |
Brian Carlstrom | 8ecd08c | 2011-07-27 17:50:51 -0700 | [diff] [blame] | 33 | $(ART_TARGET_TEST_EXECUTABLES) \ |
Brian Carlstrom | 934486c | 2011-07-12 23:42:50 -0700 | [diff] [blame] | 34 | $(HOST_OUT_EXECUTABLES)/aexec \ |
Carl Shapiro | 47940d6 | 2011-08-13 22:21:30 -0700 | [diff] [blame] | 35 | $(ART_HOST_TEST_EXECUTABLES) |
Brian Carlstrom | 934486c | 2011-07-12 23:42:50 -0700 | [diff] [blame] | 36 | |
Brian Carlstrom | 4a96b60 | 2011-07-26 16:40:23 -0700 | [diff] [blame] | 37 | # "mm test-art" to build and run all tests on host and device |
| 38 | .PHONY: test-art |
| 39 | test-art: test-art-host test-art-target |
| 40 | |
Elliott Hughes | 2cae5a2 | 2011-08-14 14:27:25 -0700 | [diff] [blame] | 41 | define run-host-tests-with |
| 42 | $(foreach file,$(ART_HOST_TEST_EXECUTABLES),$(1) $(file) &&) true |
| 43 | endef |
| 44 | |
Brian Carlstrom | 934486c | 2011-07-12 23:42:50 -0700 | [diff] [blame] | 45 | # "mm test-art-host" to build and run all host tests |
| 46 | .PHONY: test-art-host |
Brian Carlstrom | b0460ea | 2011-07-29 10:08:05 -0700 | [diff] [blame] | 47 | test-art-host: $(ART_HOST_TEST_EXECUTABLES) $(ANDROID_HOST_OUT)/framework/core-hostdex.jar |
Elliott Hughes | 2cae5a2 | 2011-08-14 14:27:25 -0700 | [diff] [blame] | 48 | $(call run-host-tests-with,) |
Brian Carlstrom | 59848da | 2011-07-23 20:35:19 -0700 | [diff] [blame] | 49 | |
Elliott Hughes | 5511f21 | 2011-08-12 18:07:45 -0700 | [diff] [blame] | 50 | # "mm valgrind-art-host" to build and run all host tests under valgrind. |
| 51 | .PHONY: valgrind-art-host |
| 52 | valgrind-art-host: $(ART_HOST_TEST_EXECUTABLES) $(ANDROID_HOST_OUT)/framework/core-hostdex.jar |
Elliott Hughes | 2cae5a2 | 2011-08-14 14:27:25 -0700 | [diff] [blame] | 53 | $(call run-host-tests-with,"valgrind") |
| 54 | |
| 55 | # "mm tsan-art-host" to build and run all host tests under tsan. |
| 56 | .PHONY: tsan-art-host |
| 57 | tsan-art-host: $(ART_HOST_TEST_EXECUTABLES) $(ANDROID_HOST_OUT)/framework/core-hostdex.jar |
| 58 | $(call run-host-tests-with,"tsan") |
Elliott Hughes | 5511f21 | 2011-08-12 18:07:45 -0700 | [diff] [blame] | 59 | |
Brian Carlstrom | 4a96b60 | 2011-07-26 16:40:23 -0700 | [diff] [blame] | 60 | # "mm test-art-device" to build and run all target tests |
| 61 | .PHONY: test-art-target |
Brian Carlstrom | b0460ea | 2011-07-29 10:08:05 -0700 | [diff] [blame] | 62 | test-art-target: $(ART_TARGET_TEST_EXECUTABLES) $(ANDROID_PRODUCT_OUT)/system/framework/core.jar |
Brian Carlstrom | 4a96b60 | 2011-07-26 16:40:23 -0700 | [diff] [blame] | 63 | adb remount |
| 64 | adb sync |
| 65 | adb shell touch /sdcard/test-art-target |
| 66 | adb shell rm /sdcard/test-art-target |
Brian Carlstrom | 8ecd08c | 2011-07-27 17:50:51 -0700 | [diff] [blame] | 67 | adb shell sh -c "$(foreach file,$(ART_TARGET_TEST_EXECUTABLES), /system/bin/$(notdir $(file)) &&) touch /sdcard/test-art-target" |
Brian Carlstrom | 4a96b60 | 2011-07-26 16:40:23 -0700 | [diff] [blame] | 68 | adb pull /sdcard/test-art-target /tmp/ |
| 69 | rm /tmp/test-art-target |
| 70 | |
Brian Carlstrom | 59848da | 2011-07-23 20:35:19 -0700 | [diff] [blame] | 71 | # "mm cpplint-art" to style check art source files |
| 72 | .PHONY: cpplint-art |
| 73 | cpplint-art: |
| 74 | $(LOCAL_PATH)/tools/cpplint.py $(LOCAL_PATH)/src/*.h $(LOCAL_PATH)/src/*.cc |