Merge "Exclude test_com.android.tethering from R snapshot"
This commit is contained in:
@@ -422,6 +422,11 @@ class SnapshotBuilder:
|
|||||||
scope_pattern=r"(public|system|module-lib)",
|
scope_pattern=r"(public|system|module-lib)",
|
||||||
name_pattern=fr"({module_name}(-removed|-stubs)?)"))
|
name_pattern=fr"({module_name}(-removed|-stubs)?)"))
|
||||||
|
|
||||||
|
available_apexes = [f'"{aosp_apex}"']
|
||||||
|
if aosp_apex != "com.android.tethering":
|
||||||
|
available_apexes.append(f'"test_{aosp_apex}"')
|
||||||
|
apex_available = ",\n ".join(available_apexes)
|
||||||
|
|
||||||
bp.write(f"""
|
bp.write(f"""
|
||||||
java_sdk_library_import {{
|
java_sdk_library_import {{
|
||||||
name: "{module_name}",
|
name: "{module_name}",
|
||||||
@@ -429,8 +434,7 @@ java_sdk_library_import {{
|
|||||||
prefer: true,
|
prefer: true,
|
||||||
shared_library: {shared_library},
|
shared_library: {shared_library},
|
||||||
apex_available: [
|
apex_available: [
|
||||||
"{aosp_apex}",
|
{apex_available},
|
||||||
"test_{aosp_apex}",
|
|
||||||
],
|
],
|
||||||
public: {{
|
public: {{
|
||||||
jars: ["public/{module_name}-stubs.jar"],
|
jars: ["public/{module_name}-stubs.jar"],
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ class TestProduceDist(unittest.TestCase):
|
|||||||
modules = [
|
modules = [
|
||||||
MAINLINE_MODULES_BY_APEX["com.android.art"],
|
MAINLINE_MODULES_BY_APEX["com.android.art"],
|
||||||
MAINLINE_MODULES_BY_APEX["com.android.ipsec"],
|
MAINLINE_MODULES_BY_APEX["com.android.ipsec"],
|
||||||
|
MAINLINE_MODULES_BY_APEX["com.android.tethering"],
|
||||||
# Create a google specific module.
|
# Create a google specific module.
|
||||||
mm.aosp_to_google(MAINLINE_MODULES_BY_APEX["com.android.wifi"]),
|
mm.aosp_to_google(MAINLINE_MODULES_BY_APEX["com.android.wifi"]),
|
||||||
]
|
]
|
||||||
@@ -193,11 +194,13 @@ class TestProduceDist(unittest.TestCase):
|
|||||||
[
|
[
|
||||||
# Build specific snapshots.
|
# Build specific snapshots.
|
||||||
"mainline-sdks/for-R-build/current/com.android.ipsec/sdk/ipsec-module-sdk-current.zip",
|
"mainline-sdks/for-R-build/current/com.android.ipsec/sdk/ipsec-module-sdk-current.zip",
|
||||||
|
"mainline-sdks/for-R-build/current/com.android.tethering/sdk/tethering-module-sdk-current.zip",
|
||||||
"mainline-sdks/for-R-build/current/com.google.android.wifi/sdk/wifi-module-sdk-current.zip",
|
"mainline-sdks/for-R-build/current/com.google.android.wifi/sdk/wifi-module-sdk-current.zip",
|
||||||
"mainline-sdks/for-S-build/current/com.android.art/host-exports/art-module-host-exports-current.zip",
|
"mainline-sdks/for-S-build/current/com.android.art/host-exports/art-module-host-exports-current.zip",
|
||||||
"mainline-sdks/for-S-build/current/com.android.art/sdk/art-module-sdk-current.zip",
|
"mainline-sdks/for-S-build/current/com.android.art/sdk/art-module-sdk-current.zip",
|
||||||
"mainline-sdks/for-S-build/current/com.android.art/test-exports/art-module-test-exports-current.zip",
|
"mainline-sdks/for-S-build/current/com.android.art/test-exports/art-module-test-exports-current.zip",
|
||||||
"mainline-sdks/for-S-build/current/com.android.ipsec/sdk/ipsec-module-sdk-current.zip",
|
"mainline-sdks/for-S-build/current/com.android.ipsec/sdk/ipsec-module-sdk-current.zip",
|
||||||
|
"mainline-sdks/for-S-build/current/com.android.tethering/sdk/tethering-module-sdk-current.zip",
|
||||||
"mainline-sdks/for-S-build/current/com.google.android.wifi/sdk/wifi-module-sdk-current.zip",
|
"mainline-sdks/for-S-build/current/com.google.android.wifi/sdk/wifi-module-sdk-current.zip",
|
||||||
"mainline-sdks/for-latest-build/current/com.android.art/host-exports/art-module-host-exports-current.zip",
|
"mainline-sdks/for-latest-build/current/com.android.art/host-exports/art-module-host-exports-current.zip",
|
||||||
"mainline-sdks/for-latest-build/current/com.android.art/sdk/art-module-sdk-current-api-diff.txt",
|
"mainline-sdks/for-latest-build/current/com.android.art/sdk/art-module-sdk-current-api-diff.txt",
|
||||||
@@ -205,6 +208,8 @@ class TestProduceDist(unittest.TestCase):
|
|||||||
"mainline-sdks/for-latest-build/current/com.android.art/test-exports/art-module-test-exports-current.zip",
|
"mainline-sdks/for-latest-build/current/com.android.art/test-exports/art-module-test-exports-current.zip",
|
||||||
"mainline-sdks/for-latest-build/current/com.android.ipsec/sdk/ipsec-module-sdk-current-api-diff.txt",
|
"mainline-sdks/for-latest-build/current/com.android.ipsec/sdk/ipsec-module-sdk-current-api-diff.txt",
|
||||||
"mainline-sdks/for-latest-build/current/com.android.ipsec/sdk/ipsec-module-sdk-current.zip",
|
"mainline-sdks/for-latest-build/current/com.android.ipsec/sdk/ipsec-module-sdk-current.zip",
|
||||||
|
"mainline-sdks/for-latest-build/current/com.android.tethering/sdk/tethering-module-sdk-current-api-diff.txt",
|
||||||
|
"mainline-sdks/for-latest-build/current/com.android.tethering/sdk/tethering-module-sdk-current.zip",
|
||||||
"mainline-sdks/for-latest-build/current/com.google.android.wifi/sdk/wifi-module-sdk-current-api-diff.txt",
|
"mainline-sdks/for-latest-build/current/com.google.android.wifi/sdk/wifi-module-sdk-current-api-diff.txt",
|
||||||
"mainline-sdks/for-latest-build/current/com.google.android.wifi/sdk/wifi-module-sdk-current.zip",
|
"mainline-sdks/for-latest-build/current/com.google.android.wifi/sdk/wifi-module-sdk-current.zip",
|
||||||
],
|
],
|
||||||
@@ -213,6 +218,7 @@ class TestProduceDist(unittest.TestCase):
|
|||||||
r_snaphot_dir = os.path.join(self.tmp_out_dir,
|
r_snaphot_dir = os.path.join(self.tmp_out_dir,
|
||||||
"soong/mainline-sdks/test/for-R-build")
|
"soong/mainline-sdks/test/for-R-build")
|
||||||
aosp_ipsec_r_bp_file = "com.android.ipsec/sdk_library/Android.bp"
|
aosp_ipsec_r_bp_file = "com.android.ipsec/sdk_library/Android.bp"
|
||||||
|
aosp_tethering_r_bp_file = "com.android.tethering/sdk_library/Android.bp"
|
||||||
google_wifi_android_bp = "com.google.android.wifi/sdk_library/Android.bp"
|
google_wifi_android_bp = "com.google.android.wifi/sdk_library/Android.bp"
|
||||||
self.assertEqual([
|
self.assertEqual([
|
||||||
aosp_ipsec_r_bp_file,
|
aosp_ipsec_r_bp_file,
|
||||||
@@ -221,6 +227,12 @@ class TestProduceDist(unittest.TestCase):
|
|||||||
"com.android.ipsec/sdk_library/public/android.net.ipsec.ike.srcjar",
|
"com.android.ipsec/sdk_library/public/android.net.ipsec.ike.srcjar",
|
||||||
"com.android.ipsec/sdk_library/public/android.net.ipsec.ike.txt",
|
"com.android.ipsec/sdk_library/public/android.net.ipsec.ike.txt",
|
||||||
"com.android.ipsec/snapshot-creation-build-number.txt",
|
"com.android.ipsec/snapshot-creation-build-number.txt",
|
||||||
|
aosp_tethering_r_bp_file,
|
||||||
|
"com.android.tethering/sdk_library/public/framework-tethering-removed.txt",
|
||||||
|
"com.android.tethering/sdk_library/public/framework-tethering-stubs.jar",
|
||||||
|
"com.android.tethering/sdk_library/public/framework-tethering.srcjar",
|
||||||
|
"com.android.tethering/sdk_library/public/framework-tethering.txt",
|
||||||
|
"com.android.tethering/snapshot-creation-build-number.txt",
|
||||||
google_wifi_android_bp,
|
google_wifi_android_bp,
|
||||||
"com.google.android.wifi/sdk_library/public/framework-wifi-removed.txt",
|
"com.google.android.wifi/sdk_library/public/framework-wifi-removed.txt",
|
||||||
"com.google.android.wifi/sdk_library/public/framework-wifi-stubs.jar",
|
"com.google.android.wifi/sdk_library/public/framework-wifi-stubs.jar",
|
||||||
@@ -228,6 +240,7 @@ class TestProduceDist(unittest.TestCase):
|
|||||||
"com.google.android.wifi/sdk_library/public/framework-wifi.txt",
|
"com.google.android.wifi/sdk_library/public/framework-wifi.txt",
|
||||||
"com.google.android.wifi/snapshot-creation-build-number.txt",
|
"com.google.android.wifi/snapshot-creation-build-number.txt",
|
||||||
"ipsec-module-sdk-current.zip",
|
"ipsec-module-sdk-current.zip",
|
||||||
|
"tethering-module-sdk-current.zip",
|
||||||
"wifi-module-sdk-current.zip",
|
"wifi-module-sdk-current.zip",
|
||||||
], sorted(self.list_files_in_dir(r_snaphot_dir)))
|
], sorted(self.list_files_in_dir(r_snaphot_dir)))
|
||||||
|
|
||||||
@@ -241,6 +254,11 @@ class TestProduceDist(unittest.TestCase):
|
|||||||
expected = read_test_data("ipsec_for_r_Android.bp")
|
expected = read_test_data("ipsec_for_r_Android.bp")
|
||||||
self.assertEqual(expected, ipsec_contents)
|
self.assertEqual(expected, ipsec_contents)
|
||||||
|
|
||||||
|
# Check the contents of the AOSP tethering module
|
||||||
|
tethering_contents = read_r_snapshot_contents(aosp_tethering_r_bp_file)
|
||||||
|
expected = read_test_data("tethering_for_r_Android.bp")
|
||||||
|
self.assertEqual(expected, tethering_contents)
|
||||||
|
|
||||||
# Check the contents of the Google ipsec module
|
# Check the contents of the Google ipsec module
|
||||||
wifi_contents = read_r_snapshot_contents(google_wifi_android_bp)
|
wifi_contents = read_r_snapshot_contents(google_wifi_android_bp)
|
||||||
expected = read_test_data("google_wifi_for_r_Android.bp")
|
expected = read_test_data("google_wifi_for_r_Android.bp")
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
// DO NOT EDIT. Auto-generated by the following:
|
||||||
|
// path/to/mainline_modules_sdks.sh
|
||||||
|
//
|
||||||
|
// 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.
|
||||||
|
//
|
||||||
|
|
||||||
|
java_sdk_library_import {
|
||||||
|
name: "framework-tethering",
|
||||||
|
owner: "google",
|
||||||
|
prefer: true,
|
||||||
|
shared_library: false,
|
||||||
|
apex_available: [
|
||||||
|
"com.android.tethering",
|
||||||
|
],
|
||||||
|
public: {
|
||||||
|
jars: ["public/framework-tethering-stubs.jar"],
|
||||||
|
current_api: "public/framework-tethering.txt",
|
||||||
|
removed_api: "public/framework-tethering-removed.txt",
|
||||||
|
sdk_version: "module_current",
|
||||||
|
},
|
||||||
|
system: {
|
||||||
|
jars: ["system/framework-tethering-stubs.jar"],
|
||||||
|
current_api: "system/framework-tethering.txt",
|
||||||
|
removed_api: "system/framework-tethering-removed.txt",
|
||||||
|
sdk_version: "module_current",
|
||||||
|
},
|
||||||
|
module_lib: {
|
||||||
|
jars: ["module-lib/framework-tethering-stubs.jar"],
|
||||||
|
current_api: "module-lib/framework-tethering.txt",
|
||||||
|
removed_api: "module-lib/framework-tethering-removed.txt",
|
||||||
|
sdk_version: "module_current",
|
||||||
|
},
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user