Commit Graph

209 Commits

Author SHA1 Message Date
Treehugger Robot
655d0850ac Merge "Add third_party/cpu_features to Cronet's copybara" into main 2023-09-12 17:48:34 +00:00
Patrick Rohr
371b709921 Fix sorting in copy.bara.sky
Test: none
Change-Id: I0506ec660fd88e39079b2f36aed1516e27cdc0a6
2023-09-08 07:11:56 -07:00
Mohannad Farrag
1541d9fbd4 Add third_party/cpu_features to Cronet's copybara
See https://android-review.git.corp.google.com/c/platform/external/cronet/+/2719789/2 for more information.
Test: None

Change-Id: I3598857b2af5e09eee01ac3493135ec36b10e9b8
2023-09-08 09:23:25 +00:00
Mohannad Farrag
b16875a4d1 Add third_party/google_benchmark to cronet's copybara
Test: None
Change-Id: Id390c6c53f619b7bc87c80ae08acca9ee3a65c2e
2023-09-08 09:23:25 +00:00
Mohannad Farrag
c4daa59cd7 Move buildtools/third_party/libc++[abi] to third_party in Cronet's copybara
Test: None
Change-Id: Iaa00d4d383f84fbabe346cbe9a929ba471d68297
2023-09-08 09:23:25 +00:00
Mohannad Farrag
eaba52172c Cronet Import: Add jni_zero to the list of third_parties
Test: None
Change-Id: Iba6f410c23bdabbb5559772039b4242965e720a7
2023-09-08 09:23:03 +00:00
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
Chidera Olibie
54db2af362 [Cronet] Cancel stream before shutdown
This fixes the flakiness. Because we call to a real server,
the server may not be reachable and our assumption would fail.
When this happens, the stream hangs and engine shutdown fails with
active request error. Hence cancel the stream before calling
shutdown.

Also @Ignored this test despite the fix as a safety measure to meet
the SLO. Will re-enable afterwards.

Bug: b/292298108
Test: atest NetHttpCoverageTests --test-filter
BidirectionalStreamTest#testBidirectionalStream_GetStream_CompletesSuccessfully
Change-Id: Iaae61fc62a148b58af86fb29c248399041785f9b

Change-Id: Iea9ef0b8468ec6fa05c306ea394485cec706b9ef
2023-07-25 16:05:10 +00:00
Sam Saccone
fbfe27b641 Move OWNER reference master=>main.
BUG=b/291759353

Change-Id: Iad1bae21b54ae1ed192960da9fd8b831709a2f87
2023-07-18 17:12:49 +00:00
Patrick Rohr
81559e711f Merge changes from topic "revert-2657749-revert-2647150-httpclient-wrapper-GZUDLKEBSH-IKOKBJPMHS" into main
* changes:
  Revert^2 "Connectivity: Depend on new httpclient targets"
  Revert^2 "Cronet's MTS: don't depend on platform Cronet"
2023-07-17 21:15:54 +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
bb873a0615 Merge changes from topic "revert-2647150-httpclient-wrapper-GZUDLKEBSH" into main
* changes:
  Revert "Cronet's MTS: don't depend on platform Cronet"
  Revert "Connectivity: Depend on new httpclient targets"
2023-07-17 08:49:29 +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
73a61abe1a Merge changes from topic "httpclient-wrapper" into main
* changes:
  Connectivity: Depend on new httpclient targets
  Cronet's MTS: don't depend on platform Cronet
2023-07-14 14:36:36 +00:00
Stefano Duo
515807ff72 BidirectionalStreamTest: don't cancel and block in teardown
Calling callback.blockForDone() on a non-started stream's callback will
block until it timeouts (12s). Currently, only a single test within
BidirectionalStreamTest actually starts the stream. This means that
every other tests is calling callback.blockForDone() during teardown
for no reason at all and they will just get stuck for 12s.

Change-Id: Ia40cbc371b4e2450dcd92a3ad429ff4351931a21
2023-07-12 09:54:39 +01: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
Stefano Duo
23b3543a3f Add CTS for BidirectionalStream's getters
Getters were introduced in aosp/2471845.

Bug: 288886953
Change-Id: I9c2547abff452ffec2067a2109f5a80d2a3de7bf
2023-06-29 11:48:34 +01:00
Stefano Duo
1dfec2c573 Add CTS for UrlRequest's getters
Getters are an AOSP-only concept introduced in aosp/2471845.

Bug: 288886953
Change-Id: I83cdeb7eb680105a194a1ad9f435e681253d25b3
2023-06-27 11:41:31 +01:00
Treehugger Robot
3e5aab1eda Merge "cronet tests: Do not run integration tests on R" 2023-06-06 03:03:12 +00:00
Patrick Rohr
92c4636c5c cronet tests: Do not run integration tests on R
CtsNetHttpTestCases were missing a DevSdkIgnoreRule after updating the
min_sdk version to R+ (which made it installable on R where the cronet
classes are not in the bootclasspath.)

Test: atest CtsNetHttpTestCases
Bug: 259632936
Change-Id: I706ff92376227c1759fd6e542066fcff3a7cf052
2023-06-05 15:32:54 -07:00
Patrick Rohr
a2175bd595 Merge changes from topic "cronet-114.0.5715.0"
* changes:
  cronet import: do not jarjar J.cronet_tests_N
  cronet tests: remove most of NetHttpTestsLibPreJarJar
2023-05-26 15:05:58 +00: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
Chidera Olibie
5924d6ed0f [Cronet] Make CtsNetHttpTestCases installable on older devices
This fixes a pre-existing failure on APCT.

Bug: 283927908
Test: atest CtsNetHttpTestCases
Change-Id: If341c11dd3e18be10f6c5e9984d1da304e655d23
2023-05-25 09:46:03 +00: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
Stefano Duo
50767f4260 Stop checking for QUIC success in CTS tests
These CTS tests make use of a non-hermetic server. This means that:
* Test failures are not reproducible
* Test run are affected by the enviroment they run in (e.g., network
  configuration of the device running the tests)
Ideally we would have a local QUIC test server, but setting that up is
non-trivial. So, for the time being (while I come up with a QUIC test
server setup), simply enable QUIC and test that things keep working.

Bug: 274369142
Change-Id: Icc8b04c1671189b77f7d8995b721fb52afea371d
2023-04-21 14:06:30 +01: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
53b12e3d51 Merge "[Cronet] Setup QuicTestServer" 2023-03-30 10:22:24 +00:00
Dan Stahr
045147a632 Merge "Migrate CTS test users of UploadDataProvider to a single canonical impl." 2023-03-30 07:48:09 +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
Dan Stahr
f6c1417b9a Migrate CTS test users of UploadDataProvider to a single canonical impl.
As agreed previously we should only have a single implementation of an
upload data provider in tests, unless the details of interactions
between the provider and Cronet internals are tested.

Test: atest CtsNetHttpTestCases
Change-Id: I00ea3fab56a23ae58e9a07db61c1cabf58c566fc
2023-03-29 15:44:03 +01: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
4264d1489b [Cronet] Move OWNERS file to parent tests directory
This file was added when there was only Cronet/tests/cts directory.
We now have move directories inside Cronet/tests hence the move

Test: m
Change-Id: Ib9b4af307f7085844060b4aed3b7c153a64ff962
2023-03-26 22:43:57 +00:00
Patrick Rohr
37f9b2888c Merge changes I833bff2a,I87c60690
* changes:
  cronet import: set -e -x in cronet_import.sh
  cronet import: set gclient --delete_unversioned_trees
2023-03-24 15:58:48 +00:00
Patrick Rohr
38e3cd8ee9 cronet import: set -e -x in cronet_import.sh
To better surface errors in the import script.

Test: run script
Change-Id: I833bff2aebd9a89f2cccfe3b6271db86f1bd6dab
2023-03-24 06:56:22 -07:00
Patrick Rohr
538dd3e875 cronet import: set gclient --delete_unversioned_trees
This option deletes gclient dependencies that were remove upstream, so
it makes sense to always set this flag for the import (since the import
directoy is reused to speed up the process).

This change also fixes setup_folder_origin to run in a subshell to
contain the directory change it performs.

Test: none
Change-Id: I87c60690be81843c3947acc0251967372ed4c34a
2023-03-24 06:55:49 -07: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