blob: baf5726ff8bde62fe80a94619299610dcf0c5377 [file] [log] [blame]
Paul Duffine20f1932016-11-28 15:51:09 +00001#
2# Copyright (C) 2016 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
Paul Duffin09336b52017-12-06 12:43:28 +000019# For unbundled build we'll use the prebuilt jar from prebuilts/sdk.
20ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)))
21
Paul Duffine95a8952017-11-16 15:53:09 +000022ANDROID_TEST_BASE_API_FILE := $(LOCAL_PATH)/api/android-test-base-current.txt
23ANDROID_TEST_BASE_REMOVED_API_FILE := $(LOCAL_PATH)/api/android-test-base-removed.txt
Paul Duffinbacad402017-06-28 11:57:59 +010024
Nan Zhang3fece482018-04-13 14:48:32 -070025full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.test.base.stubs,,COMMON)/classes.jar
Paul Duffinbacad402017-06-28 11:57:59 +010026# Archive a copy of the classes.jar in SDK build.
Paul Duffine95a8952017-11-16 15:53:09 +000027$(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.base.stubs.jar)
Paul Duffinbacad402017-06-28 11:57:59 +010028
Paul Duffine95a8952017-11-16 15:53:09 +000029# Check that the android.test.base.stubs library has not changed
30# ==============================================================
Paul Duffinbacad402017-06-28 11:57:59 +010031
32# Check that the API we're building hasn't changed from the not-yet-released
33# SDK version.
34$(eval $(call check-api, \
Paul Duffine95a8952017-11-16 15:53:09 +000035 check-android-test-base-api-current, \
36 $(ANDROID_TEST_BASE_API_FILE), \
Nan Zhang3fece482018-04-13 14:48:32 -070037 $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_API_FILE), \
Paul Duffine95a8952017-11-16 15:53:09 +000038 $(ANDROID_TEST_BASE_REMOVED_API_FILE), \
Nan Zhang3fece482018-04-13 14:48:32 -070039 $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_REMOVED_API_FILE), \
Paul Duffinbacad402017-06-28 11:57:59 +010040 -error 2 -error 3 -error 4 -error 5 -error 6 \
41 -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
42 -error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 \
43 -error 25 -error 26 -error 27, \
Paul Duffin21418272017-11-16 15:47:05 +000044 cat $(LOCAL_PATH)/api/apicheck_msg_android_test_base.txt, \
Paul Duffine95a8952017-11-16 15:53:09 +000045 check-android-test-base-api, \
Nan Zhang3fece482018-04-13 14:48:32 -070046 $(OUT_DOCS)/android-test-base-api-stubs-gen-docs-stubs.srcjar \
Paul Duffinbacad402017-06-28 11:57:59 +010047 ))
48
Paul Duffine95a8952017-11-16 15:53:09 +000049.PHONY: check-android-test-base-api
50checkapi: check-android-test-base-api
Paul Duffinbacad402017-06-28 11:57:59 +010051
Paul Duffine95a8952017-11-16 15:53:09 +000052.PHONY: update-android-test-base-api
53update-api: update-android-test-base-api
Paul Duffinbacad402017-06-28 11:57:59 +010054
Nan Zhang3fece482018-04-13 14:48:32 -070055update-android-test-base-api: $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_API_FILE) | $(ACP)
Paul Duffinbacad402017-06-28 11:57:59 +010056 @echo Copying current.txt
Nan Zhang3fece482018-04-13 14:48:32 -070057 $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_API_FILE) $(ANDROID_TEST_BASE_API_FILE)
Paul Duffinbacad402017-06-28 11:57:59 +010058 @echo Copying removed.txt
Nan Zhang3fece482018-04-13 14:48:32 -070059 $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_BASE_REMOVED_API_FILE) $(ANDROID_TEST_BASE_REMOVED_API_FILE)
Paul Duffinbacad402017-06-28 11:57:59 +010060
Paul Duffin09336b52017-12-06 12:43:28 +000061endif # not TARGET_BUILD_APPS not TARGET_BUILD_PDK=true
62
Paul Duffin02f42f92016-12-07 14:21:53 +000063ifeq ($(HOST_OS),linux)
64# Build the legacy-performance-test-hostdex library
65# =================================================
66# This contains the android.test.PerformanceTestCase class only
67include $(CLEAR_VARS)
68
Paul Duffindf257602016-11-30 13:29:39 +000069LOCAL_SRC_FILES := src/android/test/PerformanceTestCase.java
Paul Duffin02f42f92016-12-07 14:21:53 +000070LOCAL_MODULE := legacy-performance-test-hostdex
71
Paul Duffinf1c59612017-02-22 11:42:46 +000072include $(BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY)
Paul Duffin02f42f92016-12-07 14:21:53 +000073endif # HOST_OS == linux