Andreas Gampe | a838024 | 2017-04-07 09:18:45 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2017 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 | |
| 19 | include $(CLEAR_VARS) |
| 20 | |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 21 | # shim classes. We use one that exposes the common functionality. |
| 22 | LOCAL_SHIM_CLASSES := \ |
| 23 | 902-hello-transformation/src/art/Redefinition.java \ |
| 24 | 903-hello-tagging/src/art/Main.java \ |
| 25 | |
| 26 | LOCAL_SRC_FILES := $(LOCAL_SHIM_CLASSES) |
Andreas Gampe | a838024 | 2017-04-07 09:18:45 -0700 | [diff] [blame] | 27 | |
| 28 | # Actual test classes. |
| 29 | LOCAL_SRC_FILES += \ |
| 30 | 901-hello-ti-agent/src/art/Test901.java \ |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 31 | 902-hello-transformation/src/art/Test902.java \ |
Andreas Gampe | a838024 | 2017-04-07 09:18:45 -0700 | [diff] [blame] | 32 | 903-hello-tagging/src/art/Test903.java \ |
| 33 | 904-object-allocation/src/art/Test904.java \ |
| 34 | 905-object-free/src/art/Test905.java \ |
| 35 | 906-iterate-heap/src/art/Test906.java \ |
| 36 | 907-get-loaded-classes/src/art/Test907.java \ |
| 37 | 908-gc-start-finish/src/art/Test908.java \ |
| 38 | 910-methods/src/art/Test910.java \ |
| 39 | 911-get-stack-trace/src/art/Test911.java \ |
| 40 | 911-get-stack-trace/src/art/AllTraces.java \ |
| 41 | 911-get-stack-trace/src/art/ControlData.java \ |
| 42 | 911-get-stack-trace/src/art/Frames.java \ |
| 43 | 911-get-stack-trace/src/art/OtherThread.java \ |
| 44 | 911-get-stack-trace/src/art/PrintThread.java \ |
| 45 | 911-get-stack-trace/src/art/Recurse.java \ |
| 46 | 911-get-stack-trace/src/art/SameThread.java \ |
| 47 | 911-get-stack-trace/src/art/ThreadListTraces.java \ |
Andreas Gampe | d5f2ccc | 2017-04-19 13:37:48 -0700 | [diff] [blame] | 48 | 912-classes/src/art/Test912.java \ |
| 49 | 912-classes/src/art/DexData.java \ |
Andreas Gampe | a838024 | 2017-04-07 09:18:45 -0700 | [diff] [blame] | 50 | 913-heaps/src/art/Test913.java \ |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 51 | 914-hello-obsolescence/src/art/Test914.java \ |
| 52 | 915-obsolete-2/src/art/Test915.java \ |
| 53 | 917-fields-transformation/src/art/Test917.java \ |
Andreas Gampe | a838024 | 2017-04-07 09:18:45 -0700 | [diff] [blame] | 54 | 918-fields/src/art/Test918.java \ |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 55 | 919-obsolete-fields/src/art/Test919.java \ |
Andreas Gampe | a838024 | 2017-04-07 09:18:45 -0700 | [diff] [blame] | 56 | 920-objects/src/art/Test920.java \ |
| 57 | 922-properties/src/art/Test922.java \ |
| 58 | 923-monitors/src/art/Test923.java \ |
| 59 | 924-threads/src/art/Test924.java \ |
| 60 | 925-threadgroups/src/art/Test925.java \ |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 61 | 926-multi-obsolescence/src/art/Test926.java \ |
Andreas Gampe | a838024 | 2017-04-07 09:18:45 -0700 | [diff] [blame] | 62 | 927-timers/src/art/Test927.java \ |
| 63 | 928-jni-table/src/art/Test928.java \ |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 64 | 930-hello-retransform/src/art/Test930.java \ |
Andreas Gampe | a838024 | 2017-04-07 09:18:45 -0700 | [diff] [blame] | 65 | 931-agent-thread/src/art/Test931.java \ |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 66 | 932-transform-saves/src/art/Test932.java \ |
Andreas Gampe | a838024 | 2017-04-07 09:18:45 -0700 | [diff] [blame] | 67 | 933-misc-events/src/art/Test933.java \ |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 68 | 940-recursive-obsolete/src/art/Test940.java \ |
| 69 | 942-private-recursive/src/art/Test942.java \ |
| 70 | 944-transform-classloaders/src/art/Test944.java \ |
| 71 | 945-obsolete-native/src/art/Test945.java \ |
| 72 | 947-reflect-method/src/art/Test947.java \ |
| 73 | 951-threaded-obsolete/src/art/Test951.java \ |
| 74 | 981-dedup-original-dex/src/art/Test981.java \ |
| 75 | 982-ok-no-retransform/src/art/Test982.java \ |
| 76 | 984-obsolete-invoke/src/art/Test984.java \ |
Andreas Gampe | a838024 | 2017-04-07 09:18:45 -0700 | [diff] [blame] | 77 | |
Andreas Gampe | 87bc257 | 2017-04-10 10:41:26 -0700 | [diff] [blame] | 78 | JVMTI_RUN_TEST_GENERATED_NUMBERS := \ |
| 79 | 901 \ |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 80 | 902 \ |
Andreas Gampe | 87bc257 | 2017-04-10 10:41:26 -0700 | [diff] [blame] | 81 | 903 \ |
| 82 | 904 \ |
| 83 | 905 \ |
| 84 | 906 \ |
| 85 | 907 \ |
| 86 | 908 \ |
| 87 | 910 \ |
| 88 | 911 \ |
Andreas Gampe | d5f2ccc | 2017-04-19 13:37:48 -0700 | [diff] [blame] | 89 | 912 \ |
Andreas Gampe | 87bc257 | 2017-04-10 10:41:26 -0700 | [diff] [blame] | 90 | 913 \ |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 91 | 914 \ |
| 92 | 915 \ |
| 93 | 917 \ |
Andreas Gampe | 87bc257 | 2017-04-10 10:41:26 -0700 | [diff] [blame] | 94 | 918 \ |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 95 | 919 \ |
Andreas Gampe | 87bc257 | 2017-04-10 10:41:26 -0700 | [diff] [blame] | 96 | 920 \ |
| 97 | 922 \ |
| 98 | 923 \ |
| 99 | 924 \ |
| 100 | 925 \ |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 101 | 926 \ |
Andreas Gampe | 87bc257 | 2017-04-10 10:41:26 -0700 | [diff] [blame] | 102 | 927 \ |
| 103 | 928 \ |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 104 | 930 \ |
Andreas Gampe | 87bc257 | 2017-04-10 10:41:26 -0700 | [diff] [blame] | 105 | 931 \ |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 106 | 932 \ |
Andreas Gampe | 87bc257 | 2017-04-10 10:41:26 -0700 | [diff] [blame] | 107 | 933 \ |
Alex Light | 78d6341 | 2017-04-14 16:20:53 -0700 | [diff] [blame] | 108 | 940 \ |
| 109 | 942 \ |
| 110 | 944 \ |
| 111 | 945 \ |
| 112 | 947 \ |
| 113 | 951 \ |
| 114 | 981 \ |
| 115 | 982 \ |
| 116 | 984 \ |
Andreas Gampe | 87bc257 | 2017-04-10 10:41:26 -0700 | [diff] [blame] | 117 | |
| 118 | # Try to enforce that the directories correspond to the Java files we pull in. |
| 119 | JVMTI_RUN_TEST_DIR_CHECK := $(sort $(foreach DIR,$(JVMTI_RUN_TEST_GENERATED_NUMBERS), \ |
| 120 | $(filter $(DIR)%,$(LOCAL_SRC_FILES)))) |
| 121 | ifneq ($(sort $(LOCAL_SRC_FILES)),$(JVMTI_RUN_TEST_DIR_CHECK)) |
| 122 | $(error Missing file, compare $(sort $(LOCAL_SRC_FILES)) with $(JVMTI_RUN_TEST_DIR_CHECK)) |
| 123 | endif |
| 124 | |
| 125 | LOCAL_MODULE_CLASS := JAVA_LIBRARIES |
Andreas Gampe | a838024 | 2017-04-07 09:18:45 -0700 | [diff] [blame] | 126 | LOCAL_MODULE_TAGS := optional |
| 127 | LOCAL_JAVA_LANGUAGE_VERSION := 1.8 |
| 128 | LOCAL_MODULE := run-test-jvmti-java |
Andreas Gampe | 87bc257 | 2017-04-10 10:41:26 -0700 | [diff] [blame] | 129 | |
| 130 | GENERATED_SRC_DIR := $(call local-generated-sources-dir) |
| 131 | JVMTI_RUN_TEST_GENERATED_FILES := \ |
| 132 | $(foreach NR,$(JVMTI_RUN_TEST_GENERATED_NUMBERS),$(GENERATED_SRC_DIR)/results.$(NR).expected.txt) |
| 133 | |
| 134 | define GEN_JVMTI_RUN_TEST_GENERATED_FILE |
| 135 | |
| 136 | GEN_INPUT := $(wildcard $(LOCAL_PATH)/$(1)*/expected.txt) |
| 137 | GEN_OUTPUT := $(GENERATED_SRC_DIR)/results.$(1).expected.txt |
| 138 | $$(GEN_OUTPUT): $$(GEN_INPUT) |
| 139 | cp $$< $$@ |
| 140 | |
| 141 | GEN_INPUT := |
| 142 | GEN_OUTPUT := |
| 143 | |
| 144 | endef |
| 145 | |
| 146 | $(foreach NR,$(JVMTI_RUN_TEST_GENERATED_NUMBERS),\ |
| 147 | $(eval $(call GEN_JVMTI_RUN_TEST_GENERATED_FILE,$(NR)))) |
| 148 | LOCAL_JAVA_RESOURCE_FILES := $(JVMTI_RUN_TEST_GENERATED_FILES) |
| 149 | |
| 150 | include $(BUILD_JAVA_LIBRARY) |