blob: 70ee693a60545aaa9a1c5838396efc953917ec23 [file] [log] [blame]
Andreas Gampea8380242017-04-07 09:18:45 -07001#
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
17LOCAL_PATH := $(call my-dir)
18
19include $(CLEAR_VARS)
20
Alex Light78d63412017-04-14 16:20:53 -070021# shim classes. We use one that exposes the common functionality.
22LOCAL_SHIM_CLASSES := \
23 902-hello-transformation/src/art/Redefinition.java \
24 903-hello-tagging/src/art/Main.java \
25
26LOCAL_SRC_FILES := $(LOCAL_SHIM_CLASSES)
Andreas Gampea8380242017-04-07 09:18:45 -070027
28# Actual test classes.
29LOCAL_SRC_FILES += \
30 901-hello-ti-agent/src/art/Test901.java \
Alex Light78d63412017-04-14 16:20:53 -070031 902-hello-transformation/src/art/Test902.java \
Andreas Gampea8380242017-04-07 09:18:45 -070032 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 Gamped5f2ccc2017-04-19 13:37:48 -070048 912-classes/src/art/Test912.java \
49 912-classes/src/art/DexData.java \
Andreas Gampea8380242017-04-07 09:18:45 -070050 913-heaps/src/art/Test913.java \
Alex Light78d63412017-04-14 16:20:53 -070051 914-hello-obsolescence/src/art/Test914.java \
52 915-obsolete-2/src/art/Test915.java \
53 917-fields-transformation/src/art/Test917.java \
Andreas Gampea8380242017-04-07 09:18:45 -070054 918-fields/src/art/Test918.java \
Alex Light78d63412017-04-14 16:20:53 -070055 919-obsolete-fields/src/art/Test919.java \
Andreas Gampea8380242017-04-07 09:18:45 -070056 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 Light78d63412017-04-14 16:20:53 -070061 926-multi-obsolescence/src/art/Test926.java \
Andreas Gampea8380242017-04-07 09:18:45 -070062 927-timers/src/art/Test927.java \
63 928-jni-table/src/art/Test928.java \
Alex Light78d63412017-04-14 16:20:53 -070064 930-hello-retransform/src/art/Test930.java \
Andreas Gampea8380242017-04-07 09:18:45 -070065 931-agent-thread/src/art/Test931.java \
Alex Light78d63412017-04-14 16:20:53 -070066 932-transform-saves/src/art/Test932.java \
Andreas Gampea8380242017-04-07 09:18:45 -070067 933-misc-events/src/art/Test933.java \
Alex Light78d63412017-04-14 16:20:53 -070068 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 Gampea8380242017-04-07 09:18:45 -070077
Andreas Gampe87bc2572017-04-10 10:41:26 -070078JVMTI_RUN_TEST_GENERATED_NUMBERS := \
79 901 \
Alex Light78d63412017-04-14 16:20:53 -070080 902 \
Andreas Gampe87bc2572017-04-10 10:41:26 -070081 903 \
82 904 \
83 905 \
84 906 \
85 907 \
86 908 \
87 910 \
88 911 \
Andreas Gamped5f2ccc2017-04-19 13:37:48 -070089 912 \
Andreas Gampe87bc2572017-04-10 10:41:26 -070090 913 \
Alex Light78d63412017-04-14 16:20:53 -070091 914 \
92 915 \
93 917 \
Andreas Gampe87bc2572017-04-10 10:41:26 -070094 918 \
Alex Light78d63412017-04-14 16:20:53 -070095 919 \
Andreas Gampe87bc2572017-04-10 10:41:26 -070096 920 \
97 922 \
98 923 \
99 924 \
100 925 \
Alex Light78d63412017-04-14 16:20:53 -0700101 926 \
Andreas Gampe87bc2572017-04-10 10:41:26 -0700102 927 \
103 928 \
Alex Light78d63412017-04-14 16:20:53 -0700104 930 \
Andreas Gampe87bc2572017-04-10 10:41:26 -0700105 931 \
Alex Light78d63412017-04-14 16:20:53 -0700106 932 \
Andreas Gampe87bc2572017-04-10 10:41:26 -0700107 933 \
Alex Light78d63412017-04-14 16:20:53 -0700108 940 \
109 942 \
110 944 \
111 945 \
112 947 \
113 951 \
114 981 \
115 982 \
116 984 \
Andreas Gampe87bc2572017-04-10 10:41:26 -0700117
118# Try to enforce that the directories correspond to the Java files we pull in.
119JVMTI_RUN_TEST_DIR_CHECK := $(sort $(foreach DIR,$(JVMTI_RUN_TEST_GENERATED_NUMBERS), \
120 $(filter $(DIR)%,$(LOCAL_SRC_FILES))))
121ifneq ($(sort $(LOCAL_SRC_FILES)),$(JVMTI_RUN_TEST_DIR_CHECK))
122 $(error Missing file, compare $(sort $(LOCAL_SRC_FILES)) with $(JVMTI_RUN_TEST_DIR_CHECK))
123endif
124
125LOCAL_MODULE_CLASS := JAVA_LIBRARIES
Andreas Gampea8380242017-04-07 09:18:45 -0700126LOCAL_MODULE_TAGS := optional
127LOCAL_JAVA_LANGUAGE_VERSION := 1.8
128LOCAL_MODULE := run-test-jvmti-java
Andreas Gampe87bc2572017-04-10 10:41:26 -0700129
130GENERATED_SRC_DIR := $(call local-generated-sources-dir)
131JVMTI_RUN_TEST_GENERATED_FILES := \
132 $(foreach NR,$(JVMTI_RUN_TEST_GENERATED_NUMBERS),$(GENERATED_SRC_DIR)/results.$(NR).expected.txt)
133
134define GEN_JVMTI_RUN_TEST_GENERATED_FILE
135
136GEN_INPUT := $(wildcard $(LOCAL_PATH)/$(1)*/expected.txt)
137GEN_OUTPUT := $(GENERATED_SRC_DIR)/results.$(1).expected.txt
138$$(GEN_OUTPUT): $$(GEN_INPUT)
139 cp $$< $$@
140
141GEN_INPUT :=
142GEN_OUTPUT :=
143
144endef
145
146$(foreach NR,$(JVMTI_RUN_TEST_GENERATED_NUMBERS),\
147 $(eval $(call GEN_JVMTI_RUN_TEST_GENERATED_FILE,$(NR))))
148LOCAL_JAVA_RESOURCE_FILES := $(JVMTI_RUN_TEST_GENERATED_FILES)
149
150include $(BUILD_JAVA_LIBRARY)