From 88f0428056de7462093c08edf24ff6a100e9a49a Mon Sep 17 00:00:00 2001 From: markchien Date: Sat, 20 Jun 2020 17:37:22 +0800 Subject: [PATCH] Add tethering privileged test Create TetheringPrivilegedTests which have MAINLINE_NETWORK_STACK permission, the test can perform various network-related operations which need CAP_NET_RAW and CAP_NET_ADMIN capabilities. Bug: 145490751 Test: make TetheringPrivilegedTests Change-Id: Ic205e5183e066766377c63336d9c5171d4875c6a --- Tethering/tests/privileged/Android.bp | 30 +++++++++++++++++ .../tests/privileged/AndroidManifest.xml | 32 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 Tethering/tests/privileged/Android.bp create mode 100644 Tethering/tests/privileged/AndroidManifest.xml diff --git a/Tethering/tests/privileged/Android.bp b/Tethering/tests/privileged/Android.bp new file mode 100644 index 0000000000..a0fb24603a --- /dev/null +++ b/Tethering/tests/privileged/Android.bp @@ -0,0 +1,30 @@ +// +// Copyright (C) 2020 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: "TetheringPrivilegedTests", + srcs: [ + "src/**/*.java", + "src/**/*.kt", + ], + certificate: "networkstack", + platform_apis: true, + test_suites: [ + "general-tests", + "mts", + ], + compile_multilib: "both", +} diff --git a/Tethering/tests/privileged/AndroidManifest.xml b/Tethering/tests/privileged/AndroidManifest.xml new file mode 100644 index 0000000000..49eba15d13 --- /dev/null +++ b/Tethering/tests/privileged/AndroidManifest.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + +