Skip to content
Snippets Groups Projects
Commit 5b959548 authored by Chidera Olibie's avatar Chidera Olibie
Browse files

Setup NativeTestServer

this adds the classes dependent on the nativetestserverThis adds the classes dependent on the nativetestserver.

This setup depends on the cronet's platform implementation.
However, the tests jnilib is not prefixed and
because of that:
- We don't jarjar the base classes
- Don't jar the test classes
since the .so file needs the unjarjared versions.

Test: atest NetHttpTestServer
Bug: 267353182
Change-Id: Id5cfc8f842df4b13cef6f56dbaa6b9563c3989de
parent 4a755a7a
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ android_test {
"CtsNetHttpTestsLib",
"NetHttpTestsLibPreJarJar",
],
jarjar_rules: ":framework-tethering-jarjar-rules",
jarjar_rules: ":net-http-test-jarjar-rules",
compile_multilib: "both", // Include both the 32 and 64 bit versions
jni_libs: [
"//external/cronet:cronet_aml_components_cronet_android_cronet_tests__testing"
......
......@@ -17,12 +17,30 @@ package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
java_genrule {
name: "net-http-test-jarjar-rules",
tool_files: [
":NetHttpTestsLibPreJarJar{.jar}",
"jarjar_excludes.txt",
],
tools: [
"jarjar-rules-generator",
],
out: ["net_http_test_jarjar_rules.txt"],
cmd: "$(location jarjar-rules-generator) " +
"$(location :NetHttpTestsLibPreJarJar{.jar}) " +
"--prefix android.net.http.internal " +
"--excludes $(location jarjar_excludes.txt) " +
"--output $(out)",
}
android_library {
name: "NetHttpTestsLibPreJarJar",
srcs: ["//external/cronet:cronet_aml_javatests_sources"],
sdk_version: "test_current",
sdk_version: "module_current",
min_sdk_version: "30",
static_libs: [
"//external/cronet:cronet_testserver_utils",
"androidx.test.ext.junit",
"androidx.test.rules",
"junit",
......@@ -41,7 +59,7 @@ android_test {
"mts-target-sdk-version-current",
],
static_libs: ["NetHttpTestsLibPreJarJar"],
jarjar_rules: ":framework-tethering-jarjar-rules",
jarjar_rules: ":net-http-test-jarjar-rules",
jni_libs: [
"//external/cronet:cronet_aml_components_cronet_android_cronet_tests__testing"
],
......
# It's prohibited to jarjar androidx packages
androidx\..+
# Do not jarjar the api classes
android\.net\..+
# cronet_tests.so is not jarjared and uses base classes. We can remove this when there's a
# separate java base target to depend on.
org\.chromium\.base\..+
# Do not jarjar the tests and its utils as they also do JNI with cronet_tests.so
org\.chromium\.net\..*Test.*(\$.+)?
org\.chromium\.net\.NativeTestServer(\$.+)?
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment