From 0a42add425a719375487a97694997eed5b535929 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 9 Jan 2020 13:26:22 -0800 Subject: Convert CarDialer to Android.bp See build/soong/README.md for more information. Fixes: 122332857 Test: m checkbuild Test: m RunCarDialerRoboTests Change-Id: I2f39b705b2ae6b6bbc8a31a1a9dcc3c2247bf2b8 Merged-In: I2f39b705b2ae6b6bbc8a31a1a9dcc3c2247bf2b8 Exempt-From-Owner-Approval: cherry-pick (cherry picked from commit fb30f58dd07ae770c2db5844513ab4fd1e394e2b) --- tests/Android.mk | 19 ------------------ tests/robotests/Android.bp | 17 ++++++++++++++++ tests/robotests/Android.mk | 49 ---------------------------------------------- 3 files changed, 17 insertions(+), 68 deletions(-) delete mode 100644 tests/Android.mk create mode 100644 tests/robotests/Android.bp delete mode 100644 tests/robotests/Android.mk (limited to 'tests') diff --git a/tests/Android.mk b/tests/Android.mk deleted file mode 100644 index 0903c90c..00000000 --- a/tests/Android.mk +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2018 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -# Include all makefiles in subdirectories -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tests/robotests/Android.bp b/tests/robotests/Android.bp new file mode 100644 index 00000000..4d843dfa --- /dev/null +++ b/tests/robotests/Android.bp @@ -0,0 +1,17 @@ +//############################################################ +// Car Dialer Robolectric test target. # +//############################################################ +android_robolectric_test { + name: "CarDialerRoboTests", + + srcs: ["src/**/*.java"], + + java_resource_dirs: ["config"], + + // Include the testing libraries + libs: [ + "android.car", + ], + + instrumentation_for: "CarDialerAppForTesting", +} diff --git a/tests/robotests/Android.mk b/tests/robotests/Android.mk deleted file mode 100644 index 26134454..00000000 --- a/tests/robotests/Android.mk +++ /dev/null @@ -1,49 +0,0 @@ -LOCAL_PATH := $(call my-dir) -############################################################# -# Car Dialer Robolectric test target. # -############################################################# -include $(CLEAR_VARS) - -LOCAL_MODULE := CarDialerRoboTests -LOCAL_MODULE_CLASS := JAVA_LIBRARIES - -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_JAVA_RESOURCE_DIRS := config - -# Include the testing libraries -LOCAL_JAVA_LIBRARIES := \ - android.car \ - robolectric_android-all-stub \ - Robolectric_all-target \ - mockito-robolectric-prebuilt \ - truth-prebuilt - -LOCAL_INSTRUMENTATION_FOR := CarDialerAppForTesting - -LOCAL_MODULE_TAGS := optional - -# Generate test_config.properties -include external/robolectric-shadows/gen_test_config.mk -include $(BUILD_STATIC_JAVA_LIBRARY) - -############################################################# -# Car Dialer runner target to run the previous target. # -############################################################# -include $(CLEAR_VARS) - -LOCAL_MODULE := RunCarDialerRoboTests - -LOCAL_JAVA_LIBRARIES := \ - android.car \ - CarDialerRoboTests \ - robolectric_android-all-stub \ - Robolectric_all-target \ - mockito-robolectric-prebuilt \ - truth-prebuilt - -LOCAL_TEST_PACKAGE := CarDialerAppForTesting - -LOCAL_INSTRUMENT_SOURCE_DIRS := $(dir $(LOCAL_PATH))../src - -include external/robolectric-shadows/run_robotests.mk -- cgit v1.2.3