- May 21, 2024
-
-
Makoto Onuki authored
Bug: n/a Test: n/a Change-Id: I3c359283b8efa04d0731018c0d6647586221f8cc
-
- May 15, 2024
-
-
Makoto Onuki authored
We should minimize uses of it, but once in a while, it's useful as a last resort. Bug: 340556010 Test: atest FrameworksCoreTestsRavenwood:com.android.internal.ravenwood.RavenwoodEnvironmentTest Test: tree hugger for device side tests Merged-In: Ice651a55cad092514466dd56940a2cf7b2285e4e Change-Id: Ice651a55cad092514466dd56940a2cf7b2285e4e
-
- Dec 12, 2023
-
-
Jeff Sharkey authored
As test authors onboard their bivalent tests, they'll be using the `@IgnoreUnderRavenwood` annotation to quietly ignore tests that don't currently have enough Ravenwood support to run. However, over time the Ravenwood environment will continue to gain new functionality, and we'd like an easy way to "probe" those previously-ignored tests to see if any of them started passing. This change implements this using a locally-configured flag that unconditionally runs all tests under Ravenwood, and reports failures for any tests marked as `@IgnoreUnderRavenwood` that are now passing. (As these "failures" might be confusing for normal test authors, we leave it disabled by default in the build, and leave it for internal Ravenwood maintainers.) To confirm this works, implement two new methods on Parcel, and detect the relevant tests that started passing. Bug: 292141694 Test: atest CtsUtilTestCasesRavenwood CtsUtilTestCases Change-Id: Ied2a5e3d1781c76a4f3506192d015309f2f424b2
-
- Dec 11, 2023
-
-
Jeff Sharkey authored
* Highlight temporary strategies for JNI. * Clarify current `TEST_MAPPING` status. * Mention `@IgnoreUnderRavenwood` support at class level. * Mention strategy for bivalent tests using resources. * Concrete example of temporary directory. Bug: 292141694 Test: atest CtsUtilTestCasesRavenwood CtsUtilTestCases Change-Id: If0903296697049d248c50ab46b01b273aab26c9f
-
Dmitri Plotnikov authored
Bug: 314797745 Test: atest PowerStatsTestsRavenwood Test: atest PowerStatsTests Change-Id: I4af6e9c532285dc935f6d2156cc9cb3531d9aeaa
-
- Dec 08, 2023
-
-
Jeff Sharkey authored
Tests for these internal utils are local within the frameworks/base/ repo, instead of in CTS. To help future-proof, bring the entire os/* test directory by default into the Ravenwood suites, and give developers the way to easily opt-out with @IgnoreUnderRavenwood at the class level. Bug: 292141694 Test: atest FrameworksCoreTestsRavenwood FrameworksCoreTests Change-Id: Ia3c72c22fb3ebc8cfec7a4f9811b7e27a783e885
-
Dmitri Plotnikov authored
Bug: 314797745 Test: atest PowerStatsTestsRavenwood Test: atest PowerStatsTests Change-Id: I28f823608041cc7606bd848f3618c9c0ae5adace
-
- Dec 07, 2023
-
-
Jeff Sharkey authored
Since feature flags are becoming an important part of development work, ensure that Ravenwood tests can use existing tools such as `SetFlagsRule` to populate values for code-under-test to consume. To enable this, we extend `AndroidHeuristicsFilter` to recognize feature flags generated code, and include that in the Ravenwood environment by default. Bug: 311370221 Test: atest FrameworksCoreTestsRavenwood FrameworksCoreTests Change-Id: I526af65f816d153cb6e365cf6810a5a304d3e6a6
-
Jeff Sharkey authored
This change demonstrates a moderately complex test of a specific system service, in this case `UriGrantsManagerService`. Bug: 292141694 Test: atest FrameworksServicesTestsRavenwood FrameworksServicesTests Change-Id: Ia16632f2c9a1e24deb9c1320fdbb1c099e3d74c3
-
- Dec 06, 2023
-
-
Jeff Sharkey authored
Tests for these internal utils are local within the frameworks/base/ repo, instead of in CTS. To help future-proof, bring the entire utils/* test directory by default into the Ravenwood suites, and give developers the way to easily opt-out with @IgnoreUnderRavenwood at the class level. Bug: 292141694 Test: atest FrameworksCoreTestsRavenwood FrameworksCoreTests Test: atest FrameworksUtilTestsRavenwood FrameworksUtilTests Change-Id: Ibcabec764efa31cc8cb4c56d7815948d4029aaea
-
- Dec 05, 2023
-
-
Jeff Sharkey authored
Tests for these internal utils are local within the frameworks/base/ repo, instead of in CTS. To help future-proof, bring the entire utils/* test directory by default into the Ravenwood suites, and give developers the way to easily opt-out with @IgnoreUnderRavenwood at the class level. Bug: 292141694 Test: atest FrameworksCoreTestsRavenwood FrameworksCoreTests Test: atest FrameworksUtilTestsRavenwood FrameworksUtilTests Change-Id: I5251dca752396faa77774659d0923d8cdb719830
-
- Dec 04, 2023
-
-
Makoto Onuki authored
Bug: 292141694 Test: ./scripts/run-all-tests.sh Change-Id: If16c9abaeeefbf68acac0f90d8ef394871ce542a
-
Jeff Sharkey authored
Many tests across the OS are already writing tests where they "mock" their own responses from `PackageManager`, primarily by filling in the "info" objects that it returns. Since these are simple data structures that primarily hold static data, let's opt-in under Ravenwood, so that other tests can construct for their own internal uses. Complex dynamic operations, such as loading drawables, remain opted-out. This change brings along relevant CTS, but ignores several tests that currently depend on a fully-running PackageManager service. To ensure we have solid coverage, new `testSimple` is added. Bug: 292141694 Test: atest CtsContentTestCasesRavenwood Change-Id: Ie9682184cb5250f649426947bcf353802918ce50
-
- Dec 01, 2023
-
-
Makoto Onuki authored
This helps examine what ravenwood test jars contain. Currently it's rather large: $ ll $ANDROID_HOST_OUT/testcases/RavenwoodMinimumTest/RavenwoodMinimumTest.jar -rw-r--r-- 1 omakoto primarygroup 2705929 Dec 1 11:06 /android/main-without-vendor/out/host/linux-x86/testcases/RavenwoodMinimumTest/RavenwoodMinimumTest.jar $ jar tvf $ANDROID_HOST_OUT/testcases/RavenwoodMinimumTest/RavenwoodMinimumTest.jar | wc -l 2000 Seems like we're pulling in even kotlin runtime classes from the androidx dependencies? We can move them to ravenwood-runtime. Bug: 292141694 Test: atest --host RavenwoodMinimumTest Change-Id: Ifb939c9914ef7fa6610adb697d05369d16c76d29
-
Makoto Onuki authored
Bug: 292141694 Test: Tree hugger Change-Id: Ica5cfff6bc209376ab39f665d48f992c143c49a2
-
- Nov 30, 2023
-
-
Jeff Sharkey authored
General-purpose library code, along with tests. Part of preparing to onboard `PackageManager` info objects. Bug: 292141694 Test: atest InternalTestsRavenwood Change-Id: Idc0000151cac14bc03b4ca9bfa3000d582ee1602
-
- Nov 29, 2023
-
-
Jeff Sharkey authored
As part of upcoming `servicestests` work, this change makes some general changes. We don't currently have Mainline stubs included in the Ravenwood runtime, so this change "hides" references in `PackageManagerInternal` and `ActivityManagerInternal` while keeping the clients working. Adds support for `Process.setCanSelfBackground()` to support ServiceThread. Adds support for `LocalServices`, along with a new hook to clear out any registered services between each Ravenwood test. Bug: 292141694 Test: atest CtsUtilTestCasesRavenwood Change-Id: Iea3b4a5bf2ebebb34d56cfc76014fc07987cf355
-
Jeff Sharkey authored
Another common utility that is valuable, along with relevant tests. Bug: 292141694 Test: atest CtsUtilTestCasesRavenwood:LruCacheTest CtsUtilTestCases:LruCacheTest Change-Id: Ic2212518a61287fe1e4782075c8df20fed24f6d0
-
Jeff Sharkey authored
These are common utility classes used by framework code, so support them and their relevant tests. Since they depend on ErrnoException and IoUtils, bring over limited versions of those classes into `libcore-fake`, and compile them into the Ravenwood runtime using variant washing. Bug: 292141694 Test: atest FrameworksCoreTestsRavenwood FrameworksUtilTestsRavenwood Change-Id: Ib44dedacfa4d12a7d697973caf070477ed07202d
-
Makoto Onuki authored
See below for the log filename. Also disable an unimplemented flag. Bug: 311174191 Test: ./scripts/run-all-tests.sh Test: m framework-minus-apex.ravenwood and examine console output and out/soong/.intermediates/frameworks/base/framework-minus-apex.ravenwood-base/android_common/gen/hoststubgen_framework-minus-apex.log Change-Id: I9997370c93e2fe90276d5f3e657d45d440ca0a59
-
Jeff Sharkey authored
Even though developers are encouraged to use Mockito, existing tests may still be using this old library for their mocking. We'll circle back later to consider support for components such as ContentProvider, Service, etc. Clean up OWNERS. Bug: 310268946 Test: atest android.test.mock.ravenwood.tests Change-Id: Ie3f4ccea9cf6719d61cff277a627825868edc992
-
- Nov 28, 2023
-
-
Jeff Sharkey authored
Bug: 292141694 Test: none Change-Id: Iaa8b163bf0700fa6ef5c9ef5e022b68c1a932273
-
Makoto Onuki authored
Also fix the AIDL class detection. Test: m framework-minus-apex.ravenwood and make sure IAccountAthenticator and its nested classes are all kept. Test: ./run-all-tests.sh Change-Id: Idb870a6e7558f7303a2072afbede2a868204e2bf
-
- Nov 22, 2023
-
-
Makoto Onuki authored
Bug: 292141694 Test: atest CtsUtilTestCasesRavenwood Change-Id: I4068c227b4d42b34d2a7e1e5da2032a870b3cfc2
-
- Nov 21, 2023
-
-
Jeff Sharkey authored
Now that we have a solid foundation of classes available, one of the tricker pieces is supporting Handler/Looper under Ravenwood. At its core, the native implementation of MessageQueue can be emulated using core JVM primitives, which is enough to reliably pass CTS. Advanced features like FileDescriptor events will need to wait until we eventually have real JNI support. Fix obscure bug with SystemClock; must be positive number. Always start our "fake" pointers from 1 to prevent `nullptr` oddness. Bug: 292141694 Test: atest-dev CtsOsTestCasesRavenwood CtsOsTestCases Change-Id: I0f82b659973443968ef2609a7e3151f381abff29
-
Jeff Sharkey authored
Insets, Point, PointF, Rect, and RectF are all foundational structs that don't rely on any complex logic, so they're prime candidates to support for use by Ravenwood host-side tests. Based on analysis of existing test code, they're also high-usage classes that would help enable many "small" tests. Bug: 292141694 Test: atest CtsGraphicsTestCasesRavenwood CtsGraphicsTestCases Change-Id: I715d7e03187d651c506bd540e4d1735d56c27ec8
-
Jeff Sharkey authored
Support single simple tuple class in Ravenwood. Bug: 292141694 Test: atest-dev CtsAccountManagerTestCasesRavenwood CtsAccountManagerTestCases Change-Id: I877cce30d180e87c9715391fb488bc7313156bea
-
- Nov 20, 2023
-
-
Jeff Sharkey authored
Internal test authors are likely going to want to use internal utilities that aren't in the official API surface. This change adds those to Ravenwood, along with local tests to confirm they work. Bug: 292141694 Test: atest-dev FrameworksUtilTestsRavenwood Change-Id: I0f4df50416d153418d4525bd8ec5c4dbf04521a2
-
- Nov 16, 2023
-
-
Jeff Sharkey authored
A handful of TextUtils utility methods are fully supportable on a typical host JVM, so this change marks them as being available. It also brings along the relevant CTS to ensure consistency with how a real device behaves. Bug: 292141694 Test: atest-dev CtsTextTestCasesRavenwood CtsTextTestCases Change-Id: I460719c67ac4bde9e8baee0ac72d3062401d7d67
-
Jeff Sharkey authored
Some CTS tests desire to link against `test_current` to prove to themselves that they're not touching hidden APIs. This means if they also want to use our `ravenwood-junit` rules, that dependency also needs to link against `test_current`. Since we're reaching down into plenty of hidden details when we're actually running on a Ravenwood runtime, we split into a `stub` and an `impl` library, so that we give a cleanly compiling library to to clients, which is then replaced under the Ravenwood runtime. Bug: 292141694 Test: atest-dev CtsTextTestCasesRavenwood CtsTextTestCases Change-Id: I96dbc9643324a7853a992e97b51a88f70eb721f3
-
- Nov 15, 2023
-
-
Jeff Sharkey authored
To aid future auditing, and determining which tests might be ready to enable, support adding blockedBy and/or reason to the @IgnoreUnderRavenwood annotation. Apply to most of our existing usages in tests. Bug: 292141694 Test: atest-dev CtsUtilTestCasesRavenwood CtsProtoTestCasesRavenwood CtsOsTestCasesRavenwood CtsContentTestCasesRavenwood CtsDatabaseTestCasesRavenwood Change-Id: I8807c44013f8f029844de641b43804ecf3766acb
-
Jeff Sharkey authored
Initial pass at foundational classes under android.database, along with CTS to verify consistency. Unfortunately much of the CTS is structured as integration tests, when it'd be possible to verify behavior as unit tests using simpler tools like MatrixCursor. This change makes an effort at supporting existing tests using MatrixCursor where simple to adapt, but future changes will likely need to add more dedicated coverage. Bug: 292141694 Test: atest-dev CtsDatabaseTestCasesRavenwood CtsDatabaseTestCases Change-Id: I63c568fc2bcb9d7c1ac1f2a251442fec44a0d19a
-
Jeff Sharkey authored
Initial pass at foundational classes under android.content, along with CTS to verify consistency. Methods that interface to broader parts of OS remain marked as "throw" for the moment, such as cross-process work and StrictMode. Bug: 292141694 Test: atest-dev CtsOsTestCasesRavenwood CtsOsTestCases Test: atest-dev CtsContentTestCasesRavenwood CtsContentTestCases Change-Id: Ic3deafb1f4058fcc104882a3508728994669f7d2
-
Jeff Sharkey authored
We have the XML interfaces from libcore, but the implementations there are tied closely to things like StringPool. We thankfully have our own human-readable XML serializer that we could use, but there's unfortunately not a good pull parser. To get us unstuck for the moment, pivot the internals to unconditionally use the binary XML format, which at least we know is thoroughly tested, and any data written through this path can then also be parsed. This is enough to support PersistableBundle, and we'll circle back to get ourselves a human-readable XML implementation in the future. Bug: 292141694 Test: atest-dev CtsOsTestCasesRavenwood CtsOsTestCases Change-Id: I875a3a2b0e95e52861afe187e2a5e9f1e740d8d5
-
- Nov 13, 2023
-
-
Jeff Sharkey authored
Bring along simple UID math utility methods, and the ability to detect 32-vs-64-bit environments. Bug: 292141694 Test: atest-dev CtsOsTestCasesRavenwood CtsOsTestCases Change-Id: I5f3841dbe5cae703facc9020ba8c5405aa3ebcae
-
Makoto Onuki authored
Test: atest RavenwoodMockitoTest RavenwoodMockitoTest_device Bug: 310268946 Bug: 292141694 Change-Id: Iaf0f689d5513a1a4dce4d756aad2152202d72e6d
-
Jeff Sharkey authored
The Ravenwood environment doesn't support IPC, but much of the code that developers intend to test (such as AIDL stubs) still relies on baseline same-process behavior to be intact. This change adds UID and PID support to Process and Binder, but we carefully communicate that it's only available when the test author has configured it via a RavenwoodRule. This ensures that tests don't accidentally rely on unexpected defaults, as some tests will want AID_SYSTEM, and others want a normal app UID. Also bring along SystemClock, PatternMatcher, and ParcelUuid along with relevant tests. Finally, now that we have an IgnoreUnderRavenwood annotation, we can pivot back our default failure to be a RuntimeException instead of an AssumptionViolatedException. Bug: 292141694 Test: atest-dev CtsOsTestCasesRavenwood CtsOsTestCases Change-Id: I5f54c3179b2d305b9ab9144c43fd063c6b756e44
-
- Nov 10, 2023
-
-
Makoto Onuki authored
Test: atest RavenwoodMockitoTest Bug: 310268946 Bug: 292141694 Change-Id: I6021e67e12c60b00c54638f43c75350b0d11f0a7
-
Jeff Sharkey authored
These inline annotations make maintenance commitments easier for code owners to reason about. Bug: 292141694 Test: atest-dev CtsUtilTestCasesRavenwood CtsUtilTestCases Change-Id: Ia3479c7fd66123e2cc759c661fc551967ecdec08
-
Makoto Onuki authored
Also add some presubmit tests as a smoke test. Bug: 292141694 Test: run-all-tests.sh Test: atest --no-bazel-mode CtsUtilTestCasesRavenwood Change-Id: I30569313b764dfa30db9c2c5627050da4a6a1d67
-