Commit Graph

33 Commits

Author SHA1 Message Date
Chidera Olibie
be9f351f36 [Cronet] NetHttpCoverageTests presubmit SLO fixes
- Adds NetHttpCoverageTests to postsubmit. This would allow us
to run tests with @SkipPresubmit in post submit.
- Don't jarjar com.android.testutil so that the annotation can
still be found by the testrunner.

Bug: b/293843426
Test: th
Change-Id: I9e792d338515acba798092bbc4c615aef2cac47a
2023-08-17 14:52:31 +00:00
Chidera Olibie
cd038a07fb [Cronet] skip presubmit for flaky tests
Bug: b/293141085
Bug: b/292298108
Test: n/a
Change-Id: Ie7190c0222bd75f3f2df0c5b757b1ab9d0114d77
2023-07-25 20:56:29 +00:00
Stefano Duo
afd03947b4 Revert^2 "Cronet's MTS: don't depend on platform Cronet"
1f968f68ae

Change-Id: I6aabb1b3f59abc1c7165a997de62ea141a615834
2023-07-17 14:52:21 +00:00
Stefano Duo
1f968f68ae Revert "Cronet's MTS: don't depend on platform Cronet"
Revert submission 2647150-httpclient-wrapper

Reason for revert: ndk build break (b/291449552)

Reverted changes: /q/submissionid:2647150-httpclient-wrapper

Change-Id: I66f953e2a86867ba5ff02b88f9c5d7edeb171b98
2023-07-17 08:44:52 +00:00
Stefano Duo
a3b0b0a276 Cronet's MTS: don't depend on platform Cronet
MTS tests shouldn't load Cronet from the platform (through the
bootclasspath). They should instead bundle it directly.

Things still need to be jarjar'ed to avoid clashing with classnames on
the bootclasspath (which would otherwise take precedence). Though, this
will no longer be needed once the android.net.http -> org.chromium.net
wrapper lands (MTS will then target org.chromium.net directly, which
isn't exposed through the bootclasspath).

Bug: 288886953
Test: m & th
Change-Id: I1533b357889e13e5e1c739c8a8419d21b10face3
2023-07-06 18:53:06 +01:00
Patrick Rohr
311feaff8b cronet import: do not jarjar J.cronet_tests_N
Cronet tests do not use a jarjar prefix, so do not jarjar their J/N
implementation.

Test: atest NetHttpTests
Bug: 278639767
Change-Id: Ie4b8bfa13ecbbca014e22d653fa0d39a5554c10e
2023-05-25 23:36:26 -07:00
Patrick Rohr
cc2e2dcb44 cronet tests: remove most of NetHttpTestsLibPreJarJar
Since cronet_java_tests (previously cronet_aml_javatests_sources) is now
an android_library directly in external/cronet (to support "mm" in that
folder), the dependencies can be removed.

A form of android_library is still required to wrap cronet_java_tests,
so the AndroidManifest (in this folder) is forwarded properly to the
common coverage test target.

Test: TH
Bug: 278639767
Change-Id: I25c6371c64e6cfcbb48e9e3f2976d47279791f21
2023-05-25 23:36:26 -07:00
Patrick Rohr
2e3e2955b8 cronet: delete option to disable cronet in tm-mainline-prod
With the release cut of the July train and the recent automerger
cutover, tm-mainline-prod is now officially an abandoned branch.

This change deletes (most) infrastructure that was put in place to
disable cronet on tm-mainline-prod.

Test: builds
Change-Id: I078f2114b736a634f08d8f704c19beb2224ef645
2023-05-12 10:15:01 -07:00
Motomu Utsumi
73e2e87d56 Move cronet to framework-connectivity
aosp/2384137 added cronet to framework-tethering.
But framework-connectivity is a better place to put cronet since
cronet does not work on R devices (b/270049141) and
framework-tethering is R+, framework-connectivity is S+.

Followup CLs will move some modules (e.g. CronetJavaPrejarjarDefaults)
that use the branch dependent soong variables to framework/Android.bp

Test: TH
Bug: 278070640
Change-Id: I6bc10116759fb9e083c02147908e53022dab740a
2023-04-19 11:32:12 +09:00
Chidera Olibie
f500c2ef69 Merge "Cronet: enable CronetInputStreamTests" 2023-04-17 10:46:14 +00:00
Chidera Olibie
9c03bf16a7 Cronet: enable CronetInputStreamTests
This test needs Truth library which is part of the CronetTestJavaDefaults target
to work.

Test: atest NetHttpCoverageTests
Bug: 267353182
Change-Id: Ic3f084651af91be71832936c4fc0fdd241159198
2023-04-17 08:48:02 +00:00
Chidera Olibie
ef0074143d Revert "Fix symbol not found error for hidden apis used by MTS"
This reverts commit 5f44ed3e7e.

Reason for revert: The symbol not found error was a transient build failure.

Change-Id: Iada1a0bc9c2282286c1e3b972de42e6387c901d6
2023-04-13 09:38:39 +00:00
Chidera Olibie
de078f0ba0 Merge "[Cronet] Add framework-connectivity-t dependency for tests" 2023-03-30 14:11:24 +00:00
Chidera Olibie
0fb87665b5 Merge "[Cronet] Add test dependency on framework-connectivity" 2023-03-30 13:24:45 +00:00
Chidera Olibie
f6498e7be2 [Cronet] Add framework-connectivity-t dependency for tests
This is needed for android.net.TrafficStats dependency

Test: atest NetHttpCoverageTests
Bug: 267353182
Change-Id: Ic426a2c7844e432c6444eee56515de58b8eccb92
2023-03-29 22:47:51 +00:00
Chidera Olibie
9252a1add9 [Cronet] Setup QuicTestServer
Test: atest NetHttpCoverageTests
Bug: 267353182
Change-Id: I8b4702554aa002dd516f601a2e4260d858b55e83
2023-03-29 21:06:49 +00:00
Chidera Olibie
ea825f5312 [Cronet] Add test dependency on framework-connectivity
This is needed to access android.net.Network apis

Test: atest NetHttpCoverageTests
Bug: 267353182
Change-Id: Iabf6bfbf0c6720193e59055b4a2c52aae47a9acb
2023-03-29 20:35:57 +00:00
Chidera Olibie
9d9e9a0c77 [Cronet] Do not jarjar MockUrlRequestJobFactory
This is a test util class used by cronet_tests.

Test: atest NetHttpCoverageTests
Bug: 267353182
Change-Id: I75978f687169ebcd2930d7c7f35a4fdefbbefda1
2023-03-29 13:07:47 +00:00
Chidera Olibie
8d4702a1f0 Merge "Fix symbol not found error for hidden apis used by MTS" 2023-03-24 07:48:32 +00:00
Chidera Olibie
f818992720 Merge "Add xml config to allow cleartext traffic on some domains." 2023-03-23 17:21:30 +00:00
Chidera Olibie
5f44ed3e7e Fix symbol not found error for hidden apis used by MTS
This fails to build on git_master when
depending on `sdk_version:module-current` and
`libs:["framework-tethering-pre-jarjar"].

AIUI, some builds use sdk prebuilts that have compiled out
some of the hidden apis. And thus fails with symbol not found.

So we depend on the impl version of frame-tethering so we always
have access to these hidden apis for MTS.

Test: atestNetHttpCoverageTests
Change-Id: Id68a9051b9f8566f9ca42142669150a6db8b0925
2023-03-23 15:53:11 +00:00
Chidera Olibie
e02c571a71 Add xml config to allow cleartext traffic on some domains.
Cronet automatically prevents cleartext(http) traffic but we
need to allowlist the hosts used for testing.

Test: atest NetHttpCoverageTests
Bug: 267353182
Change-Id: Ie4ee41fac40ce80d0d76ec2e388c248d7366d334
2023-03-23 15:00:44 +00:00
Mohannad Farrag
9c6801f81b Revert^2 "gn2bp: Remove soong_namespace"
8484ec4dcd

Change-Id: I490c09179ea6a20ca5fba83c314b552d360be688
2023-03-23 12:47:47 +00:00
Mohannad Farrag
8484ec4dcd Revert "gn2bp: Remove soong_namespace"
Revert submission 2502135-remove_soong_namespace

Reason for revert: Missing line needs to be added

Reverted changes: /q/submissionid:2502135-remove_soong_namespace

Change-Id: I780a21cf7031e04eb368fda4f93ed16ea032ca8d
2023-03-23 12:36:48 +00:00
Mohannad Farrag
16ba062336 gn2bp: Remove soong_namespace
* This was causing the infra to ignore the modules and masking build errors.

Test: TH
Change-Id: Ic5aa3557353488d5370f4d9c4240954820bfe52b
2023-03-23 12:14:04 +00:00
Chidera Olibie
5b95954882 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
2023-03-22 14:36:08 +00:00
Chidera Olibie
4a755a7a99 [Cronet] Add test jni lib
This contains the test specific native classes

Test: atest NetHttpCoverageTest
Bug: 267353182
Change-Id: I2ce745418225c35e5b96e477334990a16be7246d
2023-03-21 22:57:16 +00:00
Stefano Duo
43d89f659f Reland "Bundle Cronet's boringssl"
This relands commit 2cd4ac8725

Merged-In: I903369dbad37b663a39e80149e25b0634386df6d
Change-Id: I018121bf4d02ccc59c89de39e3d1598deb9cf67b
Bug: 274094720
2023-03-17 13:46:25 +00:00
Patrick Rohr
77c084d1f6 Revert "Bundle Cronet's boringssl"
This reverts commit 2cd4ac8725.

Reason for revert: b/273575026

Change-Id: I5b9886465b8a0f71af469d303a39f670a9b0cb68
2023-03-14 22:45:06 +00:00
Stefano Duo
2cd4ac8725 Bundle Cronet's boringssl
Test: m && atest CtsNetHttpTestCases
Change-Id: I3c28a52d60128cf4324eda436c1f6e9fa463108e
2023-03-13 13:28:35 +00:00
Chidera Olibie
d66799a20c Add NetHttpCoverageTests to mainline presubmit
Mainline presubmit runs on older images. So we need to set:
- min_sdk_version to the minimum sdk we support otherwise
it would default to current
- enforce_default_target_sdk_version since mainline needs
all modules to target the latest sdk

Test: presubmit
Bug: 263294440
Change-Id: I20757b13ab9ab45908dae088c6cb6b0bbc51989d
2023-03-06 08:20:56 +00:00
Chidera Olibie
b3cad554eb Remove compile_multilib from non-coverage test target
This was added to targets being used for coverage collection

Test: atest CtsNetHttpTestCases, NetHttpTests
Change-Id: I5e8dad82d57014cffbf7ab58b54328ea04316f70
2023-02-13 14:10:23 +00:00
Chidera Olibie
d46c92f02c Create NetHttpTests target
This will hold Java classes for cronet's mts

Bug: 267353182
Test: atest NetHttpTests
Change-Id: Id2e2bbe2ce6a19c4fcabd25773d90eb0d0901437
2023-02-08 21:06:11 +00:00