1// Copyright (C) 2023 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 // See: http://go/android-license-faq 17 // A large-scale-change added 'default_applicable_licenses' to import 18 // all of the 'license_kinds' from "external_cronet_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: ["external_cronet_license"], 22} 23 24java_test_host { 25 name: "net_unittests_tester", 26 srcs: ["src/**/*.java"], 27 auto_gen_config: false, 28 test_config: "AndroidNetTest.xml", 29 libs: [ 30 "tradefed", 31 "framework-annotations-lib", 32 ], 33 defaults: [ 34 "net_unittests_data", 35 ], 36 device_common_data: [ 37 ":cronet_net_tester_app", 38 ], 39 test_suites: [ 40 "general-tests", 41 "mts-tethering", 42 ], 43 // This build fails on windows targets with "windows_common" depends on some disabled modules 44 // that are used by this test. Thus, disable this on target windows. 45 // TODO(aymanm): Remove this when b/201754360 is fixed. 46 target: { 47 windows: { 48 enabled: false, 49 }, 50 }, 51} 52 53// This is required to keep testing Cronet Stable. TH does not support, trivially, presubmit 54// testing of non-trunk_staging targets. In trunk_staging, Cronet ToT is "selected", while 55// Stable is selected everywhere else. To circumvent that, we expose a targets which are 56// always backed by Cronet Stable (hence the stable_ prefix). 57java_test_host { 58 name: "stable_net_unittests_tester", 59 srcs: ["src/**/*.java"], 60 auto_gen_config: false, 61 test_config: "StableAndroidNetTest.xml", 62 libs: [ 63 "tradefed", 64 "framework-annotations-lib", 65 ], 66 data: [ 67 ":stable_cronet_net_unittests_data", 68 ], 69 device_common_data: [ 70 ":stable_cronet_net_tester_app", 71 ], 72 test_suites: [ 73 "general-tests", 74 "mts-tethering", 75 ], 76 // This build fails on windows targets with "windows_common" depends on some disabled modules 77 // that are used by this test. Thus, disable this on target windows. 78 // TODO(aymanm): Remove this when b/201754360 is fixed. 79 target: { 80 windows: { 81 enabled: false, 82 }, 83 }, 84} 85 86java_test_host { 87 name: "cronet_unittests_tester", 88 srcs: ["src/**/*.java"], 89 auto_gen_config: false, 90 test_config: "AndroidTest.xml", 91 libs: [ 92 "tradefed", 93 "framework-annotations-lib", 94 ], 95 test_suites: [ 96 "general-tests", 97 "mts-tethering", 98 ], 99 // This build fails on windows targets with "windows_common" depends on some disabled modules 100 // that are used by this test. Thus, disable this on target windows. 101 // TODO(aymanm): Remove this when b/201754360 is fixed. 102 target: { 103 windows: { 104 enabled: false, 105 }, 106 }, 107 device_common_data: [ 108 ":cronet_tester_app", 109 ], 110} 111 112// This is required to keep testing Cronet Stable. TH does not support, trivially, presubmit 113// testing of non-trunk_staging targets. In trunk_staging, Cronet ToT is "selected", while 114// Stable is selected everywhere else. To circumvent that, we expose a targets which are 115// always backed by Cronet Stable (hence the stable_ prefix). 116java_test_host { 117 name: "stable_cronet_unittests_tester", 118 srcs: ["src/**/*.java"], 119 auto_gen_config: false, 120 test_config: "StableAndroidTest.xml", 121 libs: [ 122 "tradefed", 123 "framework-annotations-lib", 124 ], 125 test_suites: [ 126 "general-tests", 127 "mts-tethering", 128 ], 129 // This build fails on windows targets with "windows_common" depends on some disabled modules 130 // that are used by this test. Thus, disable this on target windows. 131 // TODO(aymanm): Remove this when b/201754360 is fixed. 132 target: { 133 windows: { 134 enabled: false, 135 }, 136 }, 137 device_common_data: [ 138 ":stable_cronet_tester_app", 139 ], 140} 141