blob: 945b220b527e2b2dea0e4dcfc8cde20824aa2fd3 [file] [log] [blame]
//
// Copyright (C) 2019 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.
//
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
// cronet_test_java_defaults can be used to specify a java_defaults target that
// either enables or disables Cronet tests. This is used to disable Cronet
// tests on tm-mainline-prod where the required APIs are not present.
cronet_test_java_defaults = "CronetTestJavaDefaultsEnabled"
// This is a placeholder comment to avoid merge conflicts
// as cronet_test_java_defaults may have different values
// depending on the branch
java_defaults {
name: "CronetTestJavaDefaultsEnabled",
enabled: true,
}
java_defaults {
name: "CronetTestJavaDefaultsDisabled",
enabled: false,
}
java_defaults {
name: "CronetTestJavaDefaults",
defaults: [cronet_test_java_defaults],
}
android_library {
name: "CtsNetHttpTestsLib",
sdk_version: "test_current",
srcs: [
"src/**/*.java",
"src/**/*.kt",
],
static_libs: [
"androidx.test.ext.junit",
"ctstestrunner-axt",
"ctstestserver",
"junit",
"hamcrest-library",
"kotlin-test",
],
libs: [
"android.test.base",
"androidx.annotation_annotation",
"framework-tethering",
"org.apache.http.legacy",
],
}
android_test {
name: "CtsNetHttpTestCases",
defaults: [
"cts_defaults",
"CronetTestJavaDefaults",
],
sdk_version: "test_current",
static_libs: ["CtsNetHttpTestsLib"],
// Tag this as a cts test artifact
test_suites: [
"cts",
"general-tests",
"mts-tethering"
],
}