Merge "Convert Android.mk to Android.bp for net cts" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-05-28 08:14:58 +00:00
committed by Android (Google) Code Review
9 changed files with 199 additions and 202 deletions

64
tests/cts/net/Android.bp Normal file
View File

@@ -0,0 +1,64 @@
// Copyright (C) 2008 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: "CtsNetTestCases",
defaults: ["cts_defaults"],
// Include both the 32 and 64 bit versions
compile_multilib: "both",
libs: [
"voip-common",
"org.apache.http.legacy",
"android.test.base.stubs",
],
jni_libs: [
"libcts_jni",
"libnativedns_jni",
"libnativemultinetwork_jni",
"libnativehelper_compat_libc++",
],
// include CtsTestServer as a temporary hack to free net.cts from cts.stub.
srcs: [
"src/**/*.java",
"src/**/*.kt",
],
static_libs: [
"FrameworksNetCommonTests",
"core-tests-support",
"compatibility-device-util-axt",
"ctstestrunner-axt",
"ctstestserver",
"mockwebserver",
"junit",
"junit-params",
"truth-prebuilt",
],
// uncomment when b/13249961 is fixed
// sdk_version: "current",
platform_apis: true,
// Tag this module as a cts test artifact
test_suites: [
"cts",
"vts",
"general-tests",
],
}

View File

@@ -1,62 +0,0 @@
# Copyright (C) 2008 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)
# don't include this package in any target
LOCAL_MODULE_TAGS := optional
# and when built explicitly put it in the data partition
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
# Include both the 32 and 64 bit versions
LOCAL_MULTILIB := both
LOCAL_JAVA_LIBRARIES := \
voip-common \
org.apache.http.legacy \
android.test.base.stubs \
LOCAL_JNI_SHARED_LIBRARIES := libcts_jni libnativedns_jni \
libnativemultinetwork_jni libnativehelper_compat_libc++
# include CtsTestServer as a temporary hack to free net.cts from cts.stub.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := CtsNetTestCases
LOCAL_STATIC_JAVA_LIBRARIES := \
FrameworksNetCommonTests \
core-tests-support \
compatibility-device-util-axt \
ctstestrunner-axt \
ctstestserver \
mockwebserver \
junit \
junit-params \
truth-prebuilt \
# uncomment when b/13249961 is fixed
#LOCAL_SDK_VERSION := current
LOCAL_PRIVATE_PLATFORM_APIS := true
# Tag this module as a cts test artifact
LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
include $(BUILD_CTS_PACKAGE)
include $(call all-makefiles-under,$(LOCAL_PATH))

View File

@@ -0,0 +1,33 @@
// 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: "CtsNetTestAppForApi23",
defaults: ["cts_defaults"],
// Include both the 32 and 64 bit versions
compile_multilib: "both",
srcs: ["src/**/*.java"],
sdk_version: "23",
// Tag this module as a cts test artifact
test_suites: [
"cts",
"vts",
"general-tests",
],
}

View File

@@ -1,38 +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)
# don't include this package in any target
LOCAL_MODULE_TAGS := optional
# and when built explicitly put it in the data partition
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
# Include both the 32 and 64 bit versions
LOCAL_MULTILIB := both
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := CtsNetTestAppForApi23
LOCAL_SDK_VERSION := 23
# Tag this module as a cts test artifact
LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
include $(BUILD_CTS_PACKAGE)
include $(call all-makefiles-under,$(LOCAL_PATH))

View File

@@ -0,0 +1,49 @@
// Copyright (C) 2013 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: "libnativedns_jni",
srcs: ["NativeDnsJni.c"],
shared_libs: [
"libnativehelper_compat_libc++",
"liblog",
],
stl: "libc++_static",
cflags: [
"-Wall",
"-Werror",
"-Wno-unused-parameter",
],
}
cc_library_shared {
name: "libnativemultinetwork_jni",
srcs: ["NativeMultinetworkJni.cpp"],
cflags: [
"-Wall",
"-Werror",
"-Wno-format",
],
shared_libs: [
"libandroid",
"libnativehelper_compat_libc++",
"liblog",
],
stl: "libc++_static",
}

View File

@@ -1,44 +0,0 @@
# Copyright (C) 2013 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 := libnativedns_jni
# Don't include this package in any configuration by default.
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := NativeDnsJni.c
LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
LOCAL_SHARED_LIBRARIES := libnativehelper_compat_libc++ liblog
LOCAL_CXX_STL := libc++_static
LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libnativemultinetwork_jni
# Don't include this package in any configuration by default.
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := NativeMultinetworkJni.cpp
LOCAL_CFLAGS := -Wall -Werror -Wno-format
LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
LOCAL_SHARED_LIBRARIES := libandroid libnativehelper_compat_libc++ liblog
LOCAL_CXX_STL := libc++_static
include $(BUILD_SHARED_LIBRARY)

View File

@@ -1,15 +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.
include $(call all-subdir-makefiles)

View File

@@ -0,0 +1,53 @@
// 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.
// Build the unit tests.
cc_test {
name: "CtsNativeNetTestCases",
compile_multilib: "both",
multilib: {
lib32: {
suffix: "32",
},
lib64: {
suffix: "64",
},
},
srcs: ["src/NativeQtaguidTest.cpp"],
shared_libs: [
"libutils",
"liblog",
],
static_libs: [
"libgtest",
"libqtaguid",
],
// Tag this module as a cts test artifact
test_suites: [
"cts",
"vts",
],
cflags: [
"-Werror",
"-Wall",
],
}

View File

@@ -1,43 +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.
# Build the unit tests.
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := CtsNativeNetTestCases
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest
LOCAL_MULTILIB := both
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
LOCAL_SRC_FILES := \
src/NativeQtaguidTest.cpp
LOCAL_SHARED_LIBRARIES := \
libutils \
liblog \
LOCAL_STATIC_LIBRARIES := \
libgtest \
libqtaguid \
LOCAL_CTS_TEST_PACKAGE := android.net.native
# Tag this module as a cts test artifact
LOCAL_COMPATIBILITY_SUITE := cts vts
LOCAL_CFLAGS := -Werror -Wall
include $(BUILD_CTS_EXECUTABLE)