blob: ca98dfacd31d43ca887445fc54116a7797f986fe [file] [log] [blame]
//
// 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.
//
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "art_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["art_license"],
}
cc_library {
name: "libnativeloader_testlib",
srcs: [],
stl: "none",
}
// This app is just an intermediate container to be able to include the .so
// library as a java resource in the host test. It's not actually installed or
// started.
android_test_helper_app {
name: "library_container_app",
defaults: ["art_module_source_build_java_defaults"],
manifest: "library_container_app_manifest.xml",
compile_multilib: "both",
jni_libs: ["libnativeloader_testlib"],
}
android_test_helper_app {
name: "loadlibrarytest_system_app",
defaults: ["art_module_source_build_java_defaults"],
manifest: "loadlibrarytest_system_app_manifest.xml",
srcs: ["src/android/test/app/SystemAppTest.java"],
// TODO(mast): Use old target SDK to avoid filtering on uses_library lists.
// Figure out what we need to do to make <uses-native-library> work in the
// test apps so we can use that instead.
sdk_version: "30",
static_libs: [
"androidx.test.ext.junit",
"androidx.test.ext.truth",
"androidx.test.rules",
],
}
android_test_helper_app {
name: "loadlibrarytest_vendor_app",
defaults: ["art_module_source_build_java_defaults"],
manifest: "loadlibrarytest_vendor_app_manifest.xml",
srcs: ["src/android/test/app/VendorAppTest.java"],
// TODO(mast): Use old target SDK to avoid filtering on uses_library lists.
// Figure out what we need to do to make <uses-native-library> work in the
// test apps so we can use that instead.
sdk_version: "30",
static_libs: [
"androidx.test.ext.junit",
"androidx.test.ext.truth",
"androidx.test.rules",
],
}
java_test_host {
name: "libnativeloader_e2e_tests",
defaults: ["art_module_source_build_java_defaults"],
srcs: ["src/android/test/hostside/*.java"],
libs: ["tradefed"],
java_resources: [
":library_container_app",
":loadlibrarytest_system_app",
":loadlibrarytest_vendor_app",
],
test_config: "libnativeloader_e2e_tests.xml",
test_suites: ["generic-tests"],
}