Merge "Convert Android.mk file to Android.bp"

This commit is contained in:
Treehugger Robot
2019-02-22 02:30:51 +00:00
committed by Gerrit Code Review
18 changed files with 186 additions and 251 deletions

View File

@@ -0,0 +1,25 @@
// Copyright (C) 2016 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.
android_test {
name: "MultiUserPerfTests",
srcs: ["src/**/*.java"],
static_libs: [
"android-support-test",
"ub-uiautomator",
],
platform_apis: true,
test_suites: ["device-tests"],
certificate: "platform",
}

View File

@@ -1,34 +0,0 @@
# Copyright (C) 2016 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)
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-test \
ub-uiautomator
LOCAL_PACKAGE_NAME := MultiUserPerfTests
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE += device-tests
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)

View File

@@ -0,0 +1,6 @@
java_library {
name: "apct-perftests-utils",
static_libs: ["android-support-test"],
// Build all java files in the java subdirectory
srcs: ["**/*.java"],
}

View File

@@ -1,13 +0,0 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
# Build all java files in the java subdirectory
LOCAL_SRC_FILES := $(call all-subdir-java-files)
# The name of the jar file to create
LOCAL_MODULE := apct-perftests-utils
# Build a static jar file.
include $(BUILD_STATIC_JAVA_LIBRARY)

View File

@@ -0,0 +1,21 @@
//
// Copyright (C) 2010 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.
//
android_test {
name: "HwAccelerationTest",
srcs: ["**/*.java"],
platform_apis: true,
}

View File

@@ -1,27 +0,0 @@
#
# Copyright (C) 2010 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)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := HwAccelerationTest
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MODULE_TAGS := tests
include $(BUILD_PACKAGE)

View File

@@ -0,0 +1,21 @@
android_test {
name: "JankBench",
manifest: "app/src/main/AndroidManifest.xml",
sdk_version: "current",
// omit gradle 'build' dir
srcs: ["app/src/main/java/**/*.java"],
// use appcompat/support lib from the tree, so improvements/
// regressions are reflected in test data
resource_dirs: ["app/src/main/res"],
static_libs: [
"android-support-design",
"android-support-v4",
"android-support-v7-appcompat",
"android-support-v7-cardview",
"android-support-v7-recyclerview",
"android-support-v17-leanback",
"apache-commons-math",
"junit",
],
test_suites: ["device-tests"],
}

View File

@@ -1,38 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_MANIFEST_FILE := app/src/main/AndroidManifest.xml
LOCAL_SDK_VERSION := current
LOCAL_USE_AAPT2 := true
# omit gradle 'build' dir
LOCAL_SRC_FILES := $(call all-java-files-under,app/src/main/java)
# use appcompat/support lib from the tree, so improvements/
# regressions are reflected in test data
LOCAL_RESOURCE_DIR := \
$(LOCAL_PATH)/app/src/main/res \
LOCAL_STATIC_ANDROID_LIBRARIES := \
$(ANDROID_SUPPORT_DESIGN_TARGETS) \
android-support-v4 \
android-support-v7-appcompat \
android-support-v7-cardview \
android-support-v7-recyclerview \
android-support-v17-leanback \
LOCAL_STATIC_JAVA_LIBRARIES := \
apache-commons-math \
junit
LOCAL_PACKAGE_NAME := JankBench
LOCAL_COMPATIBILITY_SUITE := device-tests
include $(BUILD_PACKAGE)

View File

@@ -0,0 +1,27 @@
// Copyright (C) 2015 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.
cc_library_shared {
name: "libnativebench",
cflags: [
"-Wno-unused-parameter",
"-Wno-unused-variable",
],
srcs: [
"Bench.cpp",
"WorkerPool.cpp",
"test.cpp",
],
host_ldlibs: ["-llog"],
}

View File

@@ -1,31 +0,0 @@
# Copyright (C) 2015 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)
LOCAL_SDK_VERSION := 26
include $(CLEAR_VARS)
LOCAL_CFLAGS = -Wno-unused-parameter
LOCAL_MODULE:= libnativebench
LOCAL_SRC_FILES := \
Bench.cpp \
WorkerPool.cpp \
test.cpp
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)

19
tests/UiBench/Android.bp Normal file
View File

@@ -0,0 +1,19 @@
android_test {
name: "UiBench",
sdk_version: "current",
min_sdk_version: "21",
// omit gradle 'build' dir
srcs: ["src/**/*.java"],
// use appcompat/support lib from the tree, so improvements/
// regressions are reflected in test data
resource_dirs: ["res"],
static_libs: [
"android-support-design",
"android-support-v4",
"android-support-v7-appcompat",
"android-support-v7-cardview",
"android-support-v7-recyclerview",
"android-support-v17-leanback",
],
test_suites: ["device-tests"],
}

View File

@@ -1,29 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_SDK_VERSION := current
LOCAL_MIN_SDK_VERSION := 21
# omit gradle 'build' dir
LOCAL_SRC_FILES := $(call all-java-files-under,src)
# use appcompat/support lib from the tree, so improvements/
# regressions are reflected in test data
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_USE_AAPT2 := true
LOCAL_STATIC_ANDROID_LIBRARIES := \
$(ANDROID_SUPPORT_DESIGN_TARGETS) \
android-support-v4 \
android-support-v7-appcompat \
android-support-v7-cardview \
android-support-v7-recyclerview \
android-support-v17-leanback
LOCAL_PACKAGE_NAME := UiBench
LOCAL_COMPATIBILITY_SUITE := device-tests
include $(BUILD_PACKAGE)

View File

@@ -0,0 +1,8 @@
android_test {
name: "UsageStatsTest",
// Only compile source java files in this apk.
srcs: ["src/**/*.java"],
static_libs: ["android-support-v4"],
certificate: "platform",
platform_apis: true,
}

View File

@@ -1,16 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
# Only compile source java files in this apk.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4
LOCAL_CERTIFICATE := platform
LOCAL_PACKAGE_NAME := UsageStatsTest
LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)

View File

@@ -0,0 +1,14 @@
java_library {
name: "com.android.test.libs.product",
installable: true,
product_specific: true,
srcs: ["product/java/**/*.java"],
required: ["com.android.test.libs.product.xml"],
}
prebuilt_etc {
name: "com.android.test.libs.product.xml",
src: "product/com.android.test.libs.product.xml",
sub_dir: "permissions",
product_specific: true,
}

View File

@@ -1,15 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := com.android.test.libs.product
LOCAL_PRODUCT_MODULE := true
LOCAL_SRC_FILES := $(call all-java-files-under, product/java)
LOCAL_REQUIRED_MODULES := com.android.test.libs.product.xml
include $(BUILD_JAVA_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := com.android.test.libs.product.xml
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/permissions
LOCAL_SRC_FILES:= product/com.android.test.libs.product.xml
include $(BUILD_PREBUILT)

View File

@@ -0,0 +1,45 @@
android_app {
name: "PrivAppPermissionTest",
sdk_version: "current",
privileged: true,
manifest: "system/AndroidManifest.xml",
required: ["privapp-permissions-test.xml"],
}
prebuilt_etc {
name: "privapp-permissions-test.xml",
src: "system/privapp-permissions-test.xml",
sub_dir: "permissions",
}
android_app {
name: "VendorPrivAppPermissionTest",
sdk_version: "current",
privileged: true,
manifest: "vendor/AndroidManifest.xml",
vendor: true,
required: ["vendorprivapp-permissions-test.xml"],
}
prebuilt_etc {
name: "vendorprivapp-permissions-test.xml",
src: "vendor/privapp-permissions-test.xml",
sub_dir: "permissions",
proprietary: true,
}
android_app {
name: "ProductPrivAppPermissionTest",
sdk_version: "current",
privileged: true,
manifest: "product/AndroidManifest.xml",
product_specific: true,
required: ["productprivapp-permissions-test.xml"],
}
prebuilt_etc {
name: "productprivapp-permissions-test.xml",
src: "product/privapp-permissions-test.xml",
sub_dir: "permissions",
product_specific: true,
}

View File

@@ -1,48 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := PrivAppPermissionTest
LOCAL_SDK_VERSION := current
LOCAL_PRIVILEGED_MODULE := true
LOCAL_MANIFEST_FILE := system/AndroidManifest.xml
LOCAL_REQUIRED_MODULES := privapp-permissions-test.xml
include $(BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_MODULE := privapp-permissions-test.xml
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions
LOCAL_SRC_FILES:= system/privapp-permissions-test.xml
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := VendorPrivAppPermissionTest
LOCAL_SDK_VERSION := current
LOCAL_PRIVILEGED_MODULE := true
LOCAL_MANIFEST_FILE := vendor/AndroidManifest.xml
LOCAL_VENDOR_MODULE := true
LOCAL_REQUIRED_MODULES := vendorprivapp-permissions-test.xml
include $(BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_MODULE := vendorprivapp-permissions-test.xml
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/permissions
LOCAL_SRC_FILES:= vendor/privapp-permissions-test.xml
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_PACKAGE_NAME := ProductPrivAppPermissionTest
LOCAL_SDK_VERSION := current
LOCAL_PRIVILEGED_MODULE := true
LOCAL_MANIFEST_FILE := product/AndroidManifest.xml
LOCAL_PRODUCT_MODULE := true
LOCAL_REQUIRED_MODULES := productprivapp-permissions-test.xml
include $(BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_MODULE := productprivapp-permissions-test.xml
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/permissions
LOCAL_SRC_FILES:= product/privapp-permissions-test.xml
include $(BUILD_PREBUILT)