Merge "Convert FrameworksCoreTests to Android.bp"

This commit is contained in:
Treehugger Robot
2019-02-26 06:58:52 +00:00
committed by Gerrit Code Review
61 changed files with 582 additions and 589 deletions

View File

@@ -0,0 +1,110 @@
android_test {
name: "FrameworksCoreTests",
srcs: [
"src/**/*.java",
"src/**/I*.aidl",
"DisabledTestApp/src/**/*.java",
"EnabledTestApp/src/**/*.java",
"BinderProxyCountingTestApp/src/**/*.java",
"BinderProxyCountingTestService/src/**/*.java",
"aidl/**/I*.aidl",
],
aidl: {
local_include_dirs: ["aidl"],
},
dxflags: ["--core-library"],
aaptflags: [
"-0 .dat",
"-0 .gld",
"-c fa",
],
static_libs: [
"frameworks-base-testutils",
"core-tests-support",
"android-common",
"frameworks-core-util-lib",
"mockwebserver",
"guava",
"android-support-test",
"mockito-target-minus-junit4",
"espresso-core",
"ub-uiautomator",
"platform-test-annotations",
"compatibility-device-util",
"truth-prebuilt",
"print-test-util-lib",
],
libs: [
"android.test.runner",
"telephony-common",
"org.apache.http.legacy",
"android.test.base",
"android.test.mock",
"framework-atb-backward-compatibility",
],
platform_apis: true,
test_suites: ["device-tests"],
certificate: "platform",
resource_dirs: ["res"],
resource_zips: [":FrameworksCoreTests_apks_as_resources"],
}
// Rules to copy all the test apks to the intermediate raw resource directory
java_genrule {
name: "FrameworksCoreTests_apks_as_resources",
srcs: [
":FrameworksCoreTests_install",
":FrameworksCoreTests_install_bad_dex",
":FrameworksCoreTests_install_complete_package_info",
":FrameworksCoreTests_install_decl_perm",
":FrameworksCoreTests_install_jni_lib_open_from_apk",
":FrameworksCoreTests_install_loc_auto",
":FrameworksCoreTests_install_loc_internal",
":FrameworksCoreTests_install_loc_sdcard",
":FrameworksCoreTests_install_loc_unspecified",
":FrameworksCoreTests_install_multi_package",
":FrameworksCoreTests_install_split_base",
":FrameworksCoreTests_install_split_feature_a",
":FrameworksCoreTests_install_use_perm_good",
":FrameworksCoreTests_install_uses_feature",
":FrameworksCoreTests_install_verifier_bad",
":FrameworksCoreTests_install_verifier_good",
":FrameworksCoreTests_keyset_permdef_sa_unone",
":FrameworksCoreTests_keyset_permuse_sa_ua_ub",
":FrameworksCoreTests_keyset_permuse_sb_ua_ub",
":FrameworksCoreTests_keyset_sab_ua",
":FrameworksCoreTests_keyset_sa_ua",
":FrameworksCoreTests_keyset_sa_uab",
":FrameworksCoreTests_keyset_sa_ua_ub",
":FrameworksCoreTests_keyset_sa_ub",
":FrameworksCoreTests_keyset_sa_unone",
":FrameworksCoreTests_keyset_sau_ub",
":FrameworksCoreTests_keyset_sb_ua",
":FrameworksCoreTests_keyset_sb_ub",
":FrameworksCoreTests_keyset_splata_api",
":FrameworksCoreTests_keyset_splat_api",
":FrameworksCoreTests_locales",
":FrameworksCoreTests_version_1",
":FrameworksCoreTests_version_1_diff",
":FrameworksCoreTests_version_1_nosys",
":FrameworksCoreTests_version_2",
":FrameworksCoreTests_version_2_diff",
":FrameworksCoreTests_version_3",
],
out: ["FrameworkCoreTests_apks_as_resources.res.zip"],
tools: ["soong_zip"],
cmd: "mkdir -p $(genDir)/res/raw && " +
"for i in $(in); do " +
" x=$${i##*FrameworksCoreTests_}; echo $${x}; cp $$i $(genDir)/res/raw/$${x%.apk};" +
"done && " +
"$(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res",
}

View File

@@ -1,82 +0,0 @@
ACTUAL_LOCAL_PATH := $(call my-dir)
# this var will hold all the test apk module names later.
FrameworkCoreTests_all_apks :=
# We have to include the subdir makefiles first
# so that FrameworkCoreTests_all_apks will be populated correctly.
include $(call all-makefiles-under,$(ACTUAL_LOCAL_PATH))
LOCAL_PATH := $(ACTUAL_LOCAL_PATH)
include $(CLEAR_VARS)
# We only want this apk build for tests.
LOCAL_MODULE_TAGS := tests
# Include all test java files.
LOCAL_SRC_FILES := \
$(call all-java-files-under, src) \
$(call all-Iaidl-files-under, src) \
$(call all-java-files-under, DisabledTestApp/src) \
$(call all-java-files-under, EnabledTestApp/src) \
$(call all-java-files-under, BinderProxyCountingTestApp/src) \
$(call all-java-files-under, BinderProxyCountingTestService/src) \
$(call all-Iaidl-files-under, aidl)
LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/aidl
LOCAL_DX_FLAGS := --core-library
LOCAL_JACK_FLAGS := --multi-dex native
LOCAL_AAPT_FLAGS = -0 dat -0 gld -c fa
LOCAL_STATIC_JAVA_LIBRARIES := \
frameworks-base-testutils \
core-tests-support \
android-common \
frameworks-core-util-lib \
mockwebserver \
guava \
android-support-test \
mockito-target-minus-junit4 \
espresso-core \
ub-uiautomator \
platform-test-annotations \
compatibility-device-util \
truth-prebuilt \
print-test-util-lib
LOCAL_JAVA_LIBRARIES := \
android.test.runner \
telephony-common \
org.apache.http.legacy \
android.test.base \
android.test.mock \
framework-atb-backward-compatibility \
LOCAL_PACKAGE_NAME := FrameworksCoreTests
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_CERTIFICATE := platform
# intermediate dir to include all the test apks as raw resource
FrameworkCoreTests_intermediates := $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME))/test_apks/res
LOCAL_RESOURCE_DIR := $(FrameworkCoreTests_intermediates) $(LOCAL_PATH)/res
# Disable AAPT2 because the hacks below depend on the AAPT rules implementation
LOCAL_USE_AAPT2 := false
include $(BUILD_PACKAGE)
# Rules to copy all the test apks to the intermediate raw resource directory
FrameworkCoreTests_all_apks_res := $(addprefix $(FrameworkCoreTests_intermediates)/raw/, \
$(foreach a, $(FrameworkCoreTests_all_apks), $(patsubst FrameworkCoreTests_%,%,$(a))))
$(FrameworkCoreTests_all_apks_res): $(FrameworkCoreTests_intermediates)/raw/%: $(call intermediates-dir-for,APPS,FrameworkCoreTests_%)/package.apk
$(call copy-file-to-new-target)
# Use R_file_stamp as dependency because we want the test apks in place before the R.java is generated.
$(R_file_stamp) : $(FrameworkCoreTests_all_apks_res)
FrameworkCoreTests_all_apks :=
FrameworkCoreTests_intermediates :=
FrameworkCoreTests_all_apks_res :=

View File

@@ -0,0 +1,25 @@
// Copyright (C) 2017 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_helper_app {
name: "BinderProxyCountingTestApp",
static_libs: ["coretests-aidl"],
srcs: ["**/*.java"],
sdk_version: "current",
certificate: "platform",
test_suites: ["device-tests"],
}

View File

@@ -1,29 +0,0 @@
# Copyright (C) 2017 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_STATIC_JAVA_LIBRARIES := coretests-aidl
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := BinderProxyCountingTestApp
LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
LOCAL_COMPATIBILITY_SUITE := device-tests
include $(BUILD_PACKAGE)

View File

@@ -0,0 +1,25 @@
// Copyright (C) 2017 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_helper_app {
name: "BinderProxyCountingTestService",
static_libs: ["coretests-aidl"],
srcs: ["**/*.java"],
platform_apis: true,
certificate: "platform",
test_suites: ["device-tests"],
}

View File

@@ -1,29 +0,0 @@
# Copyright (C) 2017 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_STATIC_JAVA_LIBRARIES := coretests-aidl
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := BinderProxyCountingTestService
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_COMPATIBILITY_SUITE := device-tests
include $(BUILD_PACKAGE)

View File

@@ -0,0 +1,34 @@
// Copyright (C) 2017 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_helper_app {
name: "BstatsTestApp",
test_suites: [
"device-tests",
],
static_libs: ["coretests-aidl"],
srcs: ["**/*.java"],
sdk_version: "current",
certificate: "platform",
dex_preopt: {
enabled: false,
},
optimize: {
enabled: false,
},
}

View File

@@ -1,34 +0,0 @@
# Copyright (C) 2017 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_COMPATIBILITY_SUITE := device-tests
LOCAL_STATIC_JAVA_LIBRARIES := coretests-aidl
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := BstatsTestApp
LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
LOCAL_DEX_PREOPT := false
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_COMPATIBILITY_SUITE := device-tests
include $(BUILD_PACKAGE)

View File

@@ -0,0 +1,8 @@
android_test_helper_app {
name: "DisabledTestApp",
srcs: ["**/*.java"],
sdk_version: "current",
certificate: "platform",
}

View File

@@ -1,13 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := DisabledTestApp
LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)

View File

@@ -0,0 +1,8 @@
android_test_helper_app {
name: "EnabledTestApp",
srcs: ["**/*.java"],
sdk_version: "current",
certificate: "platform",
}

View File

@@ -1,13 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := EnabledTestApp
LOCAL_SDK_VERSION := current
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)

View File

@@ -0,0 +1,19 @@
// Copyright (C) 2017 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.
java_test {
name: "coretests-aidl",
sdk_version: "current",
srcs: ["**/*.aidl"],
}

View File

@@ -1,22 +0,0 @@
# Copyright (C) 2017 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_SDK_VERSION := current
LOCAL_SRC_FILES := $(call all-subdir-Iaidl-files)
LOCAL_MODULE := coretests-aidl
include $(BUILD_STATIC_JAVA_LIBRARY)

View File

@@ -0,0 +1,7 @@
java_defaults {
name: "FrameworksCoreTests_apks_defaults",
sdk_version: "current",
// Every package should have a native library
jni_libs: ["libframeworks_coretests_jni"],
}

View File

@@ -1,7 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
FrameworkCoreTests_BUILD_PACKAGE := $(LOCAL_PATH)/FrameworkCoreTests_apk.mk
# build sub packages
include $(call all-makefiles-under,$(LOCAL_PATH))

View File

@@ -1,16 +0,0 @@
LOCAL_MODULE_TAGS := tests
# Disable dexpreopt.
LOCAL_DEX_PREOPT := false
# Make sure every package name gets the FrameworkCoreTests_ prefix.
LOCAL_PACKAGE_NAME := FrameworkCoreTests_$(LOCAL_PACKAGE_NAME)
LOCAL_SDK_VERSION := current
# Every package should have a native library
LOCAL_JNI_SHARED_LIBRARIES := libframeworks_coretests_jni
FrameworkCoreTests_all_apks += $(LOCAL_PACKAGE_NAME)
include $(BUILD_PACKAGE)

View File

@@ -0,0 +1,6 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_split_base",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,10 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_split_base
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,11 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_split_feature_a",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
aaptflags: [
"--custom-package com.google.android.dexapis.splitapp.feature_a",
"--package-id 0x80",
],
}

View File

@@ -1,14 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_split_feature_a
LOCAL_USE_AAPT2 := true
LOCAL_AAPT_FLAGS += --custom-package com.google.android.dexapis.splitapp.feature_a
LOCAL_AAPT_FLAGS += --package-id 0x80
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,6 @@
android_test_helper_app {
name: "FrameworksCoreTests_install",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,8 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,23 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_bad_dex_",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["src/**/*.java"],
}
// Inject bad classes.dex file.
java_genrule {
name: "FrameworksCoreTests_install_bad_dex",
tools: [
"soong_zip",
"merge_zips",
],
srcs: [
":FrameworksCoreTests_install_bad_dex_",
"classes.dex",
],
out: ["FrameworksCoreTests_install_bad_dex.apk"],
cmd: "$(location soong_zip) -o $(genDir)/classes.dex.zip -j -f $(location classes.dex) && " +
"$(location merge_zips) -ignore-duplicates $(out) $(genDir)/classes.dex.zip " +
"$(location :FrameworksCoreTests_install_bad_dex_)",
}

View File

@@ -1,11 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_bad_dex
include $(FrameworkCoreTests_BUILD_PACKAGE)
# Override target specific variable PRIVATE_DEX_FILE to inject bad classes.dex file.
$(LOCAL_BUILT_MODULE): PRIVATE_DEX_FILE := $(LOCAL_PATH)/classes.dex

View File

@@ -0,0 +1,7 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_complete_package_info",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,13 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_complete_package_info
#LOCAL_MANIFEST_FILE := api_test/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)
#include $(BUILD_PACKAGE)

View File

@@ -0,0 +1,6 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_decl_perm",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,8 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_decl_perm
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -14,6 +14,7 @@
cc_test_library {
name: "libframeworks_coretests_jni",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["com_android_frameworks_coretests_JNITest.cpp"],

View File

@@ -0,0 +1,6 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_jni_lib_open_from_apk",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,8 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_jni_lib_open_from_apk
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,6 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_loc_auto",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,8 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_loc_auto
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,6 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_loc_internal",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,8 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_loc_internal
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,6 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_loc_sdcard",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,8 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_loc_sdcard
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,6 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_loc_unspecified",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,8 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_loc_unspecified
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,6 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_multi_package",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,14 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_multi_package
LOCAL_USE_AAPT2 := true
include $(FrameworkCoreTests_BUILD_PACKAGE)
#include $(BUILD_PACKAGE)

View File

@@ -0,0 +1,6 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_use_perm_good",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,8 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_use_perm_good
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,6 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_uses_feature",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,8 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_uses_feature
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,6 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_verifier_bad",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,10 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_verifier_bad
LOCAL_USE_AAPT2 := true
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,6 @@
android_test_helper_app {
name: "FrameworksCoreTests_install_verifier_good",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,10 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_verifier_good
LOCAL_USE_AAPT2 := true
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,120 @@
//apks signed by keyset_A
android_test_helper_app {
name: "FrameworksCoreTests_keyset_sa_unone",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
certificate: ":FrameworksCoreTests_keyset_A_cert",
manifest: "uNone/AndroidManifest.xml",
}
android_test_helper_app {
name: "FrameworksCoreTests_keyset_sa_ua",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
certificate: ":FrameworksCoreTests_keyset_A_cert",
manifest: "uA/AndroidManifest.xml",
}
android_test_helper_app {
name: "FrameworksCoreTests_keyset_sa_ub",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
certificate: ":FrameworksCoreTests_keyset_A_cert",
manifest: "uB/AndroidManifest.xml",
}
android_test_helper_app {
name: "FrameworksCoreTests_keyset_sa_uab",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
certificate: ":FrameworksCoreTests_keyset_A_cert",
manifest: "uAB/AndroidManifest.xml",
}
android_test_helper_app {
name: "FrameworksCoreTests_keyset_sa_ua_ub",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
certificate: ":FrameworksCoreTests_keyset_A_cert",
manifest: "uAuB/AndroidManifest.xml",
}
android_test_helper_app {
name: "FrameworksCoreTests_keyset_permdef_sa_unone",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
certificate: ":FrameworksCoreTests_keyset_A_cert",
manifest: "permDef/AndroidManifest.xml",
}
android_test_helper_app {
name: "FrameworksCoreTests_keyset_permuse_sa_ua_ub",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
certificate: ":FrameworksCoreTests_keyset_A_cert",
manifest: "permUse/AndroidManifest.xml",
}
//apks signed by keyset_B
android_test_helper_app {
name: "FrameworksCoreTests_keyset_sb_ua",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
certificate: ":FrameworksCoreTests_keyset_B_cert",
manifest: "uA/AndroidManifest.xml",
}
android_test_helper_app {
name: "FrameworksCoreTests_keyset_sb_ub",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
certificate: ":FrameworksCoreTests_keyset_B_cert",
manifest: "uB/AndroidManifest.xml",
}
android_test_helper_app {
name: "FrameworksCoreTests_keyset_permuse_sb_ua_ub",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
certificate: ":FrameworksCoreTests_keyset_B_cert",
manifest: "permUse/AndroidManifest.xml",
}
//apks signed by keyset_A and keyset_B
android_test_helper_app {
name: "FrameworksCoreTests_keyset_sab_ua",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
certificate: ":FrameworksCoreTests_keyset_A_cert",
additional_certificates: [":FrameworksCoreTests_keyset_B_cert"],
manifest: "uA/AndroidManifest.xml",
}
//apks signed by keyset_A and unit_test
android_test_helper_app {
name: "FrameworksCoreTests_keyset_sau_ub",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
certificate: ":FrameworksCoreTests_keyset_A_cert",
additional_certificates: [":FrameworksCoreTests_keyset_B_cert"],
manifest: "uB/AndroidManifest.xml",
}
//apks signed by platform only
android_test_helper_app {
name: "FrameworksCoreTests_keyset_splat_api",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
certificate: "platform",
manifest: "api_test/AndroidManifest.xml",
}
//apks signed by platform and keyset_A
android_test_helper_app {
name: "FrameworksCoreTests_keyset_splata_api",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
certificate: "platform",
additional_certificates: [":FrameworksCoreTests_keyset_A_cert"],
manifest: "api_test/AndroidManifest.xml",
}

View File

@@ -1,108 +0,0 @@
LOCAL_PATH:= $(call my-dir)
#apks signed by keyset_A
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := keyset_sa_unone
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/keyset_A
LOCAL_MANIFEST_FILE := uNone/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := keyset_sa_ua
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/keyset_A
LOCAL_MANIFEST_FILE := uA/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := keyset_sa_ub
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/keyset_A
LOCAL_MANIFEST_FILE := uB/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := keyset_sa_uab
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/keyset_A
LOCAL_MANIFEST_FILE := uAB/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := keyset_sa_ua_ub
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/keyset_A
LOCAL_MANIFEST_FILE := uAuB/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := keyset_permdef_sa_unone
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/keyset_A
LOCAL_MANIFEST_FILE := permDef/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := keyset_permuse_sa_ua_ub
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/keyset_A
LOCAL_MANIFEST_FILE := permUse/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)
#apks signed by keyset_B
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := keyset_sb_ua
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/keyset_B
LOCAL_MANIFEST_FILE := uA/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := keyset_sb_ub
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/keyset_B
LOCAL_MANIFEST_FILE := uB/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := keyset_permuse_sb_ua_ub
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/keyset_B
LOCAL_MANIFEST_FILE := permUse/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)
#apks signed by keyset_A and keyset_B
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := keyset_sab_ua
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/keyset_A
LOCAL_ADDITIONAL_CERTIFICATES := $(LOCAL_PATH)/../../certs/keyset_B
LOCAL_MANIFEST_FILE := uA/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)
#apks signed by keyset_A and unit_test
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := keyset_sau_ub
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/keyset_A
LOCAL_ADDITIONAL_CERTIFICATES := $(LOCAL_PATH)/../../certs/keyset_B
LOCAL_MANIFEST_FILE := uB/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)
#apks signed by platform only
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := keyset_splat_api
LOCAL_CERTIFICATE := platform
LOCAL_MANIFEST_FILE := api_test/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)
#apks signed by platform and keyset_A
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := keyset_splata_api
LOCAL_CERTIFICATE := platform
LOCAL_ADDITIONAL_CERTIFICATES := $(LOCAL_PATH)/../../certs/keyset_A
LOCAL_MANIFEST_FILE := api_test/AndroidManifest.xml
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,6 @@
android_test_helper_app {
name: "FrameworksCoreTests_locales",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
}

View File

@@ -1,8 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := locales
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,54 @@
android_test_helper_app {
name: "FrameworksCoreTests_version_1",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
aaptflags: [
"--version-code 1",
"--version-name 1.0",
],
certificate: ":FrameworksCoreTests_unit_test_cert",
}
android_test_helper_app {
name: "FrameworksCoreTests_version_2",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
aaptflags: [
"--version-code 2",
"--version-name 2.0",
],
certificate: ":FrameworksCoreTests_unit_test_cert",
}
android_test_helper_app {
name: "FrameworksCoreTests_version_3",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
aaptflags: [
"--version-code 3",
"--version-name 3.0",
],
certificate: ":FrameworksCoreTests_unit_test_cert",
}
android_test_helper_app {
name: "FrameworksCoreTests_version_1_diff",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
aaptflags: [
"--version-code 1",
"--version-name 1.0",
],
certificate: ":FrameworksCoreTests_unit_test_cert",
}
android_test_helper_app {
name: "FrameworksCoreTests_version_2_diff",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
aaptflags: [
"--version-code 2",
"--version-name 2.0",
],
certificate: ":FrameworksCoreTests_unit_test_cert",
}

View File

@@ -1,36 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := version_1
LOCAL_AAPT_FLAGS := --version-code 1 --version-name 1.0
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/unit_test
include $(FrameworkCoreTests_BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := version_2
LOCAL_AAPT_FLAGS := --version-code 2 --version-name 2.0
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/unit_test
include $(FrameworkCoreTests_BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := version_3
LOCAL_AAPT_FLAGS := --version-code 3 --version-name 3.0
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/unit_test
include $(FrameworkCoreTests_BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := version_1_diff
LOCAL_AAPT_FLAGS := --version-code 1 --version-name 1.0
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/unit_test_diff
include $(FrameworkCoreTests_BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := version_2_diff
LOCAL_AAPT_FLAGS := --version-code 2 --version-name 2.0
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/unit_test_diff
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,10 @@
android_test_helper_app {
name: "FrameworksCoreTests_version_1_nosys",
defaults: ["FrameworksCoreTests_apks_defaults"],
srcs: ["**/*.java"],
aaptflags: [
"--version-code 1",
"--version-name 1.0",
],
certificate: ":FrameworksCoreTests_unit_test_cert",
}

View File

@@ -1,9 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := version_1_nosys
LOCAL_AAPT_FLAGS := --version-code 1 --version-name 1.0
LOCAL_CERTIFICATE := $(LOCAL_PATH)/../../certs/unit_test
include $(FrameworkCoreTests_BUILD_PACKAGE)

View File

@@ -0,0 +1,14 @@
android_app_certificate {
name: "FrameworksCoreTests_keyset_A_cert",
certificate: "keyset_A",
}
android_app_certificate {
name: "FrameworksCoreTests_keyset_B_cert",
certificate: "keyset_B",
}
android_app_certificate {
name: "FrameworksCoreTests_unit_test_cert",
certificate: "unit_test",
}

View File

@@ -0,0 +1,22 @@
// 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.
java_library {
name: "frameworks-core-util-lib",
srcs: ["**/*.java"],
static_libs: ["junit"],
libs: ["android.test.base"],
}

View File

@@ -1,29 +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_MODULE := frameworks-core-util-lib
LOCAL_STATIC_JAVA_LIBRARIES := junit
LOCAL_JAVA_LIBRARIES := android.test.base
include $(BUILD_STATIC_JAVA_LIBRARY)
# Build the test APKs using their own makefiles
include $(call all-makefiles-under,$(LOCAL_PATH))