From b3af5c95b2ae40c140fcf6648b5ed5aa75100e4f Mon Sep 17 00:00:00 2001 From: Sasha Smundak Date: Mon, 29 Apr 2019 12:01:33 -0700 Subject: [PATCH] Convert hostsidetests/net/**/Android.mk file to Android.bp See build/soong/README.md for more information. Bug: 122332514 Test: atest CtsHostsideNetworkTests (same failures as in baseline) Change-Id: I5b6a22263331b19570b42f156d7ad5d59f8208b4 --- tests/cts/hostside/Android.bp | 30 ++++++++++++++++++++++ tests/cts/hostside/Android.mk | 34 ------------------------- tests/cts/hostside/aidl/Android.bp | 24 ++++++++++++++++++ tests/cts/hostside/aidl/Android.mk | 26 ------------------- tests/cts/hostside/app/Android.bp | 39 +++++++++++++++++++++++++++++ tests/cts/hostside/app/Android.mk | 39 ----------------------------- tests/cts/hostside/app2/Android.bp | 30 ++++++++++++++++++++++ tests/cts/hostside/app2/Android.mk | 37 --------------------------- tests/cts/hostside/certs/Android.bp | 4 +++ 9 files changed, 127 insertions(+), 136 deletions(-) create mode 100644 tests/cts/hostside/Android.bp delete mode 100644 tests/cts/hostside/Android.mk create mode 100644 tests/cts/hostside/aidl/Android.bp delete mode 100644 tests/cts/hostside/aidl/Android.mk create mode 100644 tests/cts/hostside/app/Android.bp delete mode 100644 tests/cts/hostside/app/Android.mk create mode 100644 tests/cts/hostside/app2/Android.bp delete mode 100644 tests/cts/hostside/app2/Android.mk create mode 100644 tests/cts/hostside/certs/Android.bp diff --git a/tests/cts/hostside/Android.bp b/tests/cts/hostside/Android.bp new file mode 100644 index 0000000000..b6f514233a --- /dev/null +++ b/tests/cts/hostside/Android.bp @@ -0,0 +1,30 @@ +// Copyright (C) 2014 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_host { + name: "CtsHostsideNetworkTests", + defaults: ["cts_defaults"], + // Only compile source java files in this apk. + srcs: ["src/**/*.java"], + libs: [ + "cts-tradefed", + "tradefed", + ], + // Tag this module as a cts test artifact + test_suites: [ + "cts", + "vts", + "general-tests", + ], +} diff --git a/tests/cts/hostside/Android.mk b/tests/cts/hostside/Android.mk deleted file mode 100644 index 72705807d4..0000000000 --- a/tests/cts/hostside/Android.mk +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) 2014 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) - -# Only compile source java files in this apk. -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_MODULE := CtsHostsideNetworkTests - -LOCAL_JAVA_LIBRARIES := cts-tradefed tradefed - -LOCAL_CTS_TEST_PACKAGE := android.net.hostsidenetwork - -# Tag this module as a cts test artifact -LOCAL_COMPATIBILITY_SUITE := cts vts general-tests - -include $(BUILD_CTS_HOST_JAVA_LIBRARY) - -# Build the test APKs using their own makefiles -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tests/cts/hostside/aidl/Android.bp b/tests/cts/hostside/aidl/Android.bp new file mode 100644 index 0000000000..320a1fa443 --- /dev/null +++ b/tests/cts/hostside/aidl/Android.bp @@ -0,0 +1,24 @@ +// 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. + +java_test_helper_library { + name: "CtsHostsideNetworkTestsAidl", + sdk_version: "current", + srcs: [ + "com/android/cts/net/hostside/IMyService.aidl", + "com/android/cts/net/hostside/INetworkCallback.aidl", + "com/android/cts/net/hostside/INetworkStateObserver.aidl", + "com/android/cts/net/hostside/IRemoteSocketFactory.aidl", + ], +} diff --git a/tests/cts/hostside/aidl/Android.mk b/tests/cts/hostside/aidl/Android.mk deleted file mode 100644 index 20dabc15b2..0000000000 --- a/tests/cts/hostside/aidl/Android.mk +++ /dev/null @@ -1,26 +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_SDK_VERSION := current -LOCAL_SRC_FILES := \ - com/android/cts/net/hostside/IMyService.aidl \ - com/android/cts/net/hostside/INetworkCallback.aidl \ - com/android/cts/net/hostside/INetworkStateObserver.aidl \ - com/android/cts/net/hostside/IRemoteSocketFactory.aidl -LOCAL_MODULE := CtsHostsideNetworkTestsAidl -include $(BUILD_STATIC_JAVA_LIBRARY) diff --git a/tests/cts/hostside/app/Android.bp b/tests/cts/hostside/app/Android.bp new file mode 100644 index 0000000000..d66b71ba83 --- /dev/null +++ b/tests/cts/hostside/app/Android.bp @@ -0,0 +1,39 @@ +// +// Copyright (C) 2014 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: "CtsHostsideNetworkTestsApp", + defaults: ["cts_support_defaults"], + //sdk_version: "current", + platform_apis: true, + static_libs: [ + "compatibility-device-util-axt", + "ctstestrunner-axt", + "ub-uiautomator", + "CtsHostsideNetworkTestsAidl", + ], + libs: [ + "android.test.runner.stubs", + "android.test.base.stubs", + ], + srcs: ["src/**/*.java"], + // Tag this module as a cts test artifact + test_suites: [ + "cts", + "vts", + "general-tests", + ], +} diff --git a/tests/cts/hostside/app/Android.mk b/tests/cts/hostside/app/Android.mk deleted file mode 100644 index 11f6bb1460..0000000000 --- a/tests/cts/hostside/app/Android.mk +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright (C) 2014 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_PRIVATE_PLATFORM_APIS := true -LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util-axt ctstestrunner-axt ub-uiautomator \ - CtsHostsideNetworkTestsAidl - -LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs - -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_PACKAGE_NAME := CtsHostsideNetworkTestsApp - -LOCAL_PROGUARD_ENABLED := disabled -LOCAL_DEX_PREOPT := false - -# Tag this module as a cts test artifact -LOCAL_COMPATIBILITY_SUITE := cts vts general-tests - -include $(BUILD_CTS_SUPPORT_PACKAGE) diff --git a/tests/cts/hostside/app2/Android.bp b/tests/cts/hostside/app2/Android.bp new file mode 100644 index 0000000000..8a3c8e712a --- /dev/null +++ b/tests/cts/hostside/app2/Android.bp @@ -0,0 +1,30 @@ +// +// 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_helper_app { + name: "CtsHostsideNetworkTestsApp2", + defaults: ["cts_support_defaults"], + sdk_version: "current", + static_libs: ["CtsHostsideNetworkTestsAidl"], + srcs: ["src/**/*.java"], + // Tag this module as a cts test artifact + test_suites: [ + "cts", + "vts", + "general-tests", + ], + certificate: ":cts-net-app", +} diff --git a/tests/cts/hostside/app2/Android.mk b/tests/cts/hostside/app2/Android.mk deleted file mode 100644 index 5c0bae194b..0000000000 --- a/tests/cts/hostside/app2/Android.mk +++ /dev/null @@ -1,37 +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_SDK_VERSION := current -LOCAL_STATIC_JAVA_LIBRARIES := CtsHostsideNetworkTestsAidl - -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_PACKAGE_NAME := CtsHostsideNetworkTestsApp2 - -LOCAL_PROGUARD_ENABLED := disabled -LOCAL_DEX_PREOPT := false - -# Tag this module as a cts test artifact -LOCAL_COMPATIBILITY_SUITE := cts vts general-tests - -LOCAL_CERTIFICATE := cts/hostsidetests/net/certs/cts-net-app - -include $(BUILD_CTS_SUPPORT_PACKAGE) diff --git a/tests/cts/hostside/certs/Android.bp b/tests/cts/hostside/certs/Android.bp new file mode 100644 index 0000000000..ab4cf340d0 --- /dev/null +++ b/tests/cts/hostside/certs/Android.bp @@ -0,0 +1,4 @@ +android_app_certificate { + name: "cts-net-app", + certificate: "cts-net-app", +}