- 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 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
-
- Nov 08, 2023
-
-
Jeff Sharkey authored
We have baseline implementations of the Parcel and Bundle, so we're ready to support them under the Ravenwood environment. Brings along the relevant CTS to prove that it works consistently on both devices and Ravenwood. Make a few test-driven bug fixes to Parcel code. Currently does not support FDs or Binders. Add new `@IgnoreUnderRavenwood` annotation that is respected by a new `RavenwoodRule`, letting the same test code be shared to run under both devices and Ravenwood. Currently packaged under our own area of the tree, but named to match layout of `platform_testing` for future migration. Add "ThrowClass" policy. Bug: 292141694 Test: atest-dev CtsOsTestCasesRavenwood CtsOsTestCases:ParcelTest CtsOsTestCases:BundleTest Change-Id: I88d19afff47fbea6557e922a10e8555ee0f70ba3
-
- Oct 31, 2023
-
-
Anton Hansson authored
Soong uses the directory structure to guess the java package, and "annotations-src" is not a package considered for APIs. Remove the prefix such that soong sees the correct package android.*. Hide the Ravenwood classes for now. Test: m checkapi Change-Id: I430009deb7df2beac1736c4a68ff6fa1a3be572a
-
- Oct 10, 2023
-
-
Makoto Onuki authored
Test: tree hugger Bug: 292141694 Merged-in: If4d650dc175a5a78cf8844dfed2217c19f2d5790 Change-Id: I19ed7505bfd0c71d811f98409542688094944aeb
-
- Oct 09, 2023
-
-
Makoto Onuki authored
- Add "framework-minus-apex.ravenwood". - Update the behavior of: --default-throw: - Now this will "keep" the subject classes and fields. - When a 'throw' directive is specified on a static initializer, it's now handled as 'keep', because otherwise the class wouldn't be usable. Test: ./scripts/run-all-tests.sh Test: m framework-minus-apex.ravenwood Bug: 292141694 Change-Id: If4d650dc175a5a78cf8844dfed2217c19f2d5790
-