Commit Graph

183 Commits

Author SHA1 Message Date
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
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
Patrick Rohr
2bbe771ceb cronet import: exclude .gitignore from import
Test: none
Change-Id: I79200198264a54f517a18a3cfbc77030e89f3401
2023-03-21 10:39:17 -07:00
Patrick Rohr
82104369dd cronet import: Remove //components/grpc_support from import
Cronet does not actually depend on grpc_support, so it can be removed.

Test: none
Change-Id: Ib28591bc751774244d3c62298a0d07f2163f6720
2023-03-21 09:11:29 -07:00
Stefano Duo
d18610d9b1 Merge "Add addPublicKeyPins test" 2023-03-21 14:22:56 +00:00
Patrick Rohr
796f33f3d4 Merge changes I11d77e8a,Id988da4f,I51735fdb,I3df00ebf
* changes:
  cronet import: only clone repository if it doesn't already exist
  cronet import: use aosp/upstream-import branch
  cronet import: remove zlib from import
  cronet import: add url/third_party/mozilla
2023-03-21 14:17:16 +00:00
Stefano Duo
e7529e8142 Add addPublicKeyPins test
Bug: 273626875
Test: atest -b
Change-Id: I7919e68cc44e74ab7c7978895cb2875c90ee308f
2023-03-21 11:50:43 +00:00
Patrick Rohr
e095f9d8d6 cronet import: only clone repository if it doesn't already exist
Otherwise, fetch and checkout the revision.

Test: run import
Change-Id: I11d77e8abfc50fee92f440ad46cb09ab87392e05
2023-03-21 04:45:38 -07:00
Patrick Rohr
447b79d632 cronet import: use aosp/upstream-import branch
upstream-import and upstream-staging have been created in aosp.

Test: none
Change-Id: Id988da4f1cf311f419963e1f20d4e89e92b11aca
2023-03-21 04:45:38 -07:00
Patrick Rohr
b781c8f882 cronet import: remove zlib from import
Test: run import
Change-Id: I51735fdbfee3118ec2529af7158611c25b34e79b
2023-03-21 04:45:38 -07:00
Patrick Rohr
3b452fed22 cronet import: add url/third_party/mozilla
Test: run import -- see also aosp/2498638
Change-Id: I3df00ebf2a6e737d33783c3f7b9e438f33a46822
2023-03-21 04:45:38 -07:00
Chidera Olibie
965a4bcbc5 Add setEnableBrotli tests
Test: atest CtsNetHttpTestCases
Bug: 251012627
Change-Id: I000b24fd91288e1500776b42c1aad5177cd3acfe
2023-03-20 16:52:59 +00:00
Chidera Olibie
023019600a Merge "Add setQuicOptions test" 2023-03-20 15:25:35 +00:00
Chidera Olibie
8e7ff17ae9 Merge "Add test for QuicOption.setHandshakeUserAgent" 2023-03-20 14:12:42 +00:00
Chidera Olibie
948fa4b07d Add setQuicOptions test
Bug: 251012627
Test: atest NetHttpTestCases
Change-Id: I8676a0f242d167e42b525b6e0cefc799441c2f7c
2023-03-20 13:38:10 +00:00
Chidera Olibie
f118bf5e0a Add test for QuicOption.setHandshakeUserAgent
Test: atest CtsNetHttpTestCases
Bug: 251012627
Change-Id: Id9ed74715f946e42727c63e7e0d6788258b4300c
2023-03-20 13:18:05 +00:00
Stefano Duo
a5e1029101 Merge "Reland "Bundle Cronet's boringssl"" 2023-03-20 13:10:30 +00:00
Chidera Olibie
596e9d8e5a Add CTS for QuicException
Bug: 251012627
Test: atest CtsNetHttpTestCases
Change-Id: Ib04c7474b0936dadaee5d1852fdf673baef7ed93
2023-03-17 17:35:30 +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
Motomu Utsumi
2441e4aea6 cronet: Update APIs naming
Bug: 265674359
Bug: 273937039
Test: TH
Change-Id: I5fc149396511effdfabd462eba80d1a010ee205a
2023-03-17 09:04:56 +00:00
Stefano Duo
746f10e6d0 Merge "EnableHttpCache: Make use of new CtsTestServer cachable response" 2023-03-16 17:31:43 +00:00
Dan Stahr
f7731244f5 Merge "Add tests for setting custom headers." 2023-03-16 16:11:54 +00:00
Stefano Duo
58af719c93 Merge "Use CtsTestServer to test PublicKeyPinningBypass" 2023-03-16 15:59:06 +00:00
Dan Stahr
9ed7a339a1 Merge "cronet: Fix AutoBoxing API linter issue" 2023-03-16 15:03:55 +00:00
Stefano Duo
72d18ba7c8 EnableHttpCache: Make use of new CtsTestServer cachable response
Test: atest CtsNetHttpTestCases
Change-Id: I474954623fb272a073e72b1f2dc12d6f252ba6c4
2023-03-16 14:19:34 +00:00