The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2008 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 | |
Paul Duffin | d00221c | 2017-11-07 07:33:11 +0000 | [diff] [blame] | 19 | # For unbundled build we'll use the prebuilt jar from prebuilts/sdk. |
| 20 | ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK))) |
| 21 | |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 22 | ANDROID_TEST_RUNNER_API_FILE := $(LOCAL_PATH)/api/android-test-runner-current.txt |
| 23 | ANDROID_TEST_RUNNER_REMOVED_API_FILE := $(LOCAL_PATH)/api/android-test-runner-removed.txt |
| 24 | |
Nan Zhang | 4a139d0 | 2018-04-26 14:55:41 -0700 | [diff] [blame] | 25 | full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.test.runner.stubs,,COMMON)/classes.jar |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 26 | # Archive a copy of the classes.jar in SDK build. |
| 27 | $(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.runner.stubs.jar) |
| 28 | |
| 29 | # Check that the android.test.runner.stubs library has not changed |
| 30 | # ================================================================ |
| 31 | |
| 32 | # Check that the API we're building hasn't changed from the not-yet-released |
| 33 | # SDK version. |
| 34 | $(eval $(call check-api, \ |
| 35 | check-android-test-runner-api-current, \ |
| 36 | $(ANDROID_TEST_RUNNER_API_FILE), \ |
Nan Zhang | 4a139d0 | 2018-04-26 14:55:41 -0700 | [diff] [blame] | 37 | $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE), \ |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 38 | $(ANDROID_TEST_RUNNER_REMOVED_API_FILE), \ |
Nan Zhang | 4a139d0 | 2018-04-26 14:55:41 -0700 | [diff] [blame] | 39 | $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_REMOVED_API_FILE), \ |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 40 | -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, \ |
| 44 | cat $(LOCAL_PATH)/api/apicheck_msg_android_test_runner.txt, \ |
| 45 | check-android-test-runner-api, \ |
Nan Zhang | 4a139d0 | 2018-04-26 14:55:41 -0700 | [diff] [blame] | 46 | $(OUT_DOCS)/android-test-runner-api-stubs-gen-docs-stubs.srcjar \ |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 47 | )) |
| 48 | |
| 49 | .PHONY: check-android-test-runner-api |
| 50 | checkapi: check-android-test-runner-api |
| 51 | |
| 52 | .PHONY: update-android-test-runner-api |
| 53 | update-api: update-android-test-runner-api |
| 54 | |
Nan Zhang | 4a139d0 | 2018-04-26 14:55:41 -0700 | [diff] [blame] | 55 | update-android-test-runner-api: $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE) | $(ACP) |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 56 | @echo Copying current.txt |
Nan Zhang | 4a139d0 | 2018-04-26 14:55:41 -0700 | [diff] [blame] | 57 | $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_API_FILE) $(ANDROID_TEST_RUNNER_API_FILE) |
Paul Duffin | bacad40 | 2017-06-28 11:57:59 +0100 | [diff] [blame] | 58 | @echo Copying removed.txt |
Nan Zhang | 4a139d0 | 2018-04-26 14:55:41 -0700 | [diff] [blame] | 59 | $(hide) $(ACP) $(INTERNAL_PLATFORM_ANDROID_TEST_RUNNER_REMOVED_API_FILE) $(ANDROID_TEST_RUNNER_REMOVED_API_FILE) |
Paul Duffin | d00221c | 2017-11-07 07:33:11 +0000 | [diff] [blame] | 60 | |
| 61 | endif # not TARGET_BUILD_APPS not TARGET_BUILD_PDK=true |
Paul Duffin | cc600d6 | 2017-12-11 15:13:08 +0000 | [diff] [blame] | 62 | |
| 63 | # additionally, build unit tests in a separate .apk |
| 64 | include $(call all-makefiles-under,$(LOCAL_PATH)) |