summaryrefslogtreecommitdiff
path: root/ravenwood/junit-src
AgeCommit message (Collapse)Author
2025-03-10[Ravenwood] Remove deprecated usage John Wu
Bug: 292141694 Flag: EXEMPT host side change only Test: f/b/r/scripts/run-ravenwood-tests.sh Change-Id: I75e4604f8fd391452719bf46d2f345dbb7fada66
2025-03-06RavenwoodUtils: remove verifyZeroInteractions wrapper Adrian Roos
This is no longer necessary, with the upgrade to Mockito 3 `verifyNoInteractions` is now in the tree. There are two downsides to having this available: - The current implementation of MockitoHelper.verifyZeroInteractions will fail at runtime when on-device tests migrate to Mockito 4+ - Mockito.verifyZeroInteractions has the same behavior as verify no*More*Interactions. Tests using MockitoHelper.verifyZeroInteractions will therefore observe different behavior on ravenwood and on-device. Bug: 310268946 Test: n/a, deleted code without usage Flag: TEST_ONLY Change-Id: I8e1406a99d748828724b6ac82d2a018a53e725ea
2025-02-24Multiple improvements Makoto Onuki
- Sysprops allowlist now fully moved to the text file. - Always enable the test timeout w/ improved stack traces - Add a method to "run on main thread" - Always enable the uncaught exception handler. - Tolerate assertion failures on the main looper. (rather than letting it crash the thread) - Also some other minor changes needed in my main work. Flag: EXEMPT host test change only Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: I47b060021ce46b6e9fbe4aca63835745311a4b06
2024-12-04[Ravenwood] Remove RavenwoodConfig and un-deprecate RavenwoodRule John Wu
Bug: 381081750 Flag: EXEMPT host test change only Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: I8f4236d39e0bb310627a1fdbe812657ad9ba420b
2024-12-03Make Ravenwood less verbose Makoto Onuki
- Demote some logs from `i` to `v`. (so it'll be easier to filter them out) - Guard some of the really verbose log with RAVENWOOD_VERBOSE_LOGGING Flag: EXEMPT host test change only Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: I30934ecb03929a103ff941e78605a8ca11033dfa
2024-11-27Change ravenwood default log level to verbose Makoto Onuki
- Otherwise, it'll be hard to debug issues from the log from the CI server. - Also change all ravenwood related log to a "Ravenwood" tag, to make it easy to filter out ravenwood log. Bug: 380949304 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh -s Test: ANDROID_LOG_TAGS='Ravenwood:s' atest -t RavenwoodBivalentTest Flag: EXEMPT host test change only Change-Id: Ia114d094256b365beea55c905766a4602852c742
2024-11-26Add a way to configure log levels Makoto Onuki
Bug: 381112373 Bug: 380949304 Bug: 380938496 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh -s Flag: EXEMPT host test change only Change-Id: I3851ba55abf8cdbdf518dda83b4780f2128c013d
2024-11-23[Ravenwood] Update system property handling John Wu
- Split out "core" system properties (the default properties we set during the global initialization) and "test" system properties (the properties defined and set through RavenwoodRule) - Reset only the "test" system properties before each test execution - Update the implementation to support nested RavenwoodRule in the future Flag: EXEMPT host test change only Bug: 377765941 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: Ia9a2ee217aa89e0f2565d14fb26e3842947e9dc7
2024-11-21[Ravenwood] Decouple environment setup from RavenwoodConfig John Wu
- Also deprecate RavenwoodRule.setServicesRequired so that RavenwoodRule is only used for setting system properties. Flag: EXEMPT host test change only Bug: 377765941 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: Id7ca551bd797e786f2d71777eb9f972fb5fb6c88
2024-11-18Use RavenwoodRule for system properties Makoto Onuki
We're going to remove RavenwoodConfig and will start using RavenwoodRule (again) for initializing sysprops. Flag: EXEMPT host test change only Bug: 377765941 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh -t -s Merged-in: I9b9a5c4f8987ba32353d25ebb3840b725c246e77 Change-Id: I9b9a5c4f8987ba32353d25ebb3840b725c246e77
2024-11-15Set package name via the build file, not via Config. Makoto Onuki
Flag: EXEMPT host test change only Bug: 377765941 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh -t Change-Id: Ied81b7c246a25ac376db93b2cd14b4d449359ca2
2024-11-07Merge "Deprecate unused config and make them no-op" into main John Wu
2024-11-06Deprecate unused config and make them no-op Makoto Onuki
Flag: EXEMPT host test change only Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: I1897413326b93e0f422035a3b93ce9163efc6853
2024-11-06Isolate Ravenwood sysprops from device sysprops Makoto Onuki
Now we use hardcoded sysprops for the most part. We only pull in selected properties from build.prop. Flag: EXEMPT host test change only Bug: 377577035 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: I5ff27ab8123858c71ad2645448865d8cb081b250
2024-11-01[Ravenwood] Cleanup and update RavenwoodEnvironment John Wu
- Move the UID/PID/targetSdk injection into RavenwoodRuntimeState - Update VMRuntime to return the configured target SDK level - Remove the Workaround class in RavenwoodEnvironment - Implement Os.gettid to make Process.myTid return a real value Flag: EXEMPT host test change only Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: I611a6cde7c7fb53f71a7a25e93143f4884af734b
2024-10-26[Ravenwood] Update RATR to setup environment ASAP John Wu
- Remove the workaround to record constructor exceptions and throw later, runner errors are handled properly after aosp/3310766 - Initialize Ravenwood's environment as soon as the real inner runner is instantiated, as in some cases getDescription() itself needs env setup - Make the entire environment tied to a RATR instance - Add new tests to make sure the early environment setup is working Flag: EXEMPT host test change only Bug: 356918135 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: I301607fd6602649172f16991d6d5ae1b577c47cd
2024-10-25[Ravenwood] Cleanup RATR implementation and project structure John Wu
- Create a dedicated RATR implementation specifically for device-side tests in junit-stub-src so we won't need to worry about device-side compatibility when updating RATR. - Enable Ravenizer on RavenwoodBivalentTest to ensure the "stub" RATR is working as intended - Because the real RATR is now in junit-impl-src, a lot of classes no longer need to be in junit-stub-src, as junit-src is now a lot cleaner - Remove all Ravenwood checks in RATR since the real one will always only run on Ravenwood tests - Remove RATRHook and move the hook callback methods directly in RATR Flag: EXEMPT host test change only Bug: 356918135 Test: atest RavenwoodBivalentTest_device_ravenizer Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: I18577373833d8f6390bc685c23b857be65b904dc
2024-10-21Prepare for compat-framework support Makoto Onuki
- Create a Context for the system server - Add the target SDK level to RavenwoodConfig - Allow PropertyInvalidatedCache sysprops - Copy StatsD classes, until we get a proper support - Copy Compatibility and some annotations from libcore - Keep FrameworkStatsLog Flag: EXEMPT host test change only Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: Ib572d1b25c47c693b4969d12490e593dc5f48eb1
2024-10-16[Ravenwood] Always provide main thread John Wu
It is very difficult for test owners to know whether a main thread is actually required. Besides, the Ravenwood environment itself relies on a main thread. Flag: EXEMPT host test change only Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: I88ed44f00ce6295dcb14619428a2c7a4bea0bbdb
2024-10-15[Ravenwood] Load default properties from build.prop John Wu
Flag: EXEMPT host test change only Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: Ifdd991c7c85d1a81309721dc44017d3b9cad1894
2024-09-26[Ravenwood] Use native system property implementation John Wu
System properties are not only used by Java code, but also native code. To make the property values consistent across Java and native code, make the "source of truth" of property values on the native side. In order to achieve this, we have to introduce a new native library "libravenwood_sysprops" that does NOT link against libbase, and load that library first. By doing so, we can override the low-level sysprop function symbols with our own implementation. Once that is done, all existing native code accessing system properties, regardless whether they use the libbase/libcutils wrappers or the raw sysprop functions will go through Ravenwood's implementation. Other than improving system properties, this provides the infrastructure to override/implement C functions that is used in native code. Bug: 292141694 Flag: EXEMPT host test change only Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Merged-in: I14678e2ac52ace0b23bd53df7b6092a1cbb881b3 Change-Id: I14678e2ac52ace0b23bd53df7b6092a1cbb881b3
2024-09-26Cherry-pick Ravenwood "core" code John Wu
- Copied f/b/r and f/b/t/h - Ported files under f/b/core, only what needed to for run-ravenwood-tests.sh to pass - Local changes because of missing resoucres support - Added @DisabledOnRavenwood(reason="AOSP is missing resources support") to tests under f/b/r that depends on resources bivalentinst and servicestest - Added try-catch around ResourcesManager.setInstance() Flag: EXEMPT host test change only Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Merged-in: I8a9b8374be3ae052ba4f152eb43af20d0871597f Change-Id: Iefd574dbded8c4ab2e244c4918c26641364a3432
2024-09-20Allow to add a bug number to ravenwood annotations Makoto Onuki
Flag: EXEMPT host test change only Bug: 292141694 Test: treehugger (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7aca35e22dd73d7277821f46dd1869777cafe507) Merged-In: I50389646482067671f1df6f159561e9058eca4e3 Change-Id: I50389646482067671f1df6f159561e9058eca4e3
2024-07-24Changed ravenwood-junit to use module_current Felipe Leme
Otherwise it cannot be used by mainline modules. Test: atest --host AdServicesSharedLibrariesUnitTestsRavenwood Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Bug: 335935200 Flag: TEST_ONLY Change-Id: I75fc6f919ba7e45eb2fec825a2adc499a6be1b4f Merged-In: I75fc6f919ba7e45eb2fec825a2adc499a6be1b4f
2024-05-23[Ravenwood] Internal clean up, more PFD APIs, OsConstants, etc Makoto Onuki
- Support a few more ParcelFileDescriptor APIs. - Support OsConstants and a couple of Os APIs. - Also clean up f/b/ravenwood. Now we have "runtime-common" library that can be used from different components of Ravenwood infra, with native code support. Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Test: CtsOsTestCases (on tree hugger) Flag: EXEMPT hostside test change only Change-Id: I259a04201e05e615e17da0529cb500a102887ec9
2024-05-21Ensure Build is always usable on Ravenwood ... Makoto Onuki
... even without a RavenwoodRule. There are situation where android APIs are called outside of a RavenwoodRule, but some of the APIs require a RavenwoodRule to initialize them. Since Build and SystemProperties are critical and often used by the test infra code (e.g. test runner or other junit rules), make sure they're always accessible. Fix: 341735388 Test: atest CtsOsTestCases Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: Iedcfae7e75c5ee9f2c7fb87c61262c2b33450d04
2024-05-20Revert "[Ravenwood] Internal clean up, more PFD APIs, OsConstant..." Makoto Onuki
Revert submission 27402077-2024-05-17-PFD Reason for revert: Broke tests Reverted changes: /q/submissionid:27402077-2024-05-17-PFD Change-Id: If2b50329dbcaccb5f13f7631f1fa4df532bfcc60
2024-05-20[Ravenwood] Internal clean up, more PFD APIs, OsConstants, etc Makoto Onuki
- Support a few more ParcelFileDescriptor APIs. - Support OsConstants and a couple of Os APIs. - Also clean up f/b/ravenwood. Now we have "runtime-common" library that can be used from different components of Ravenwood infra, with native code support. Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Test: CtsOsTestCases (on tree hugger) Change-Id: Ia06873114e80e9dd309d2cf077b208aaa7396542
2024-05-01[Ravenwood] Support NativeAllocationRegistry Makoto Onuki
We don't track native allocation size, but we still need to release native allocations. Bug: 337110712 Test: atest RavenwoodBivalentTest Test: atest RavenwoodBivalentTest_device Test: ./ravenwood/scripts/run-ravenwood-tests.sh Change-Id: Ia50c963731a26fc951a8040cbf353a5c56505b6a
2024-04-05Ravenwood reafatoring Makoto Onuki
Move all the tests to the `com.android.ravenwoodtest` package in order to tell them part from actual ravenwood code. This allows various tools to ignore ravenwood code without ignoring ravenwood test code. Test: ./ravenwood/scripts/run-ravenwood-tests.sh Bug: 292141694 Change-Id: I48728784e7dd2e5aea3327da793923c8ef3b795d
2024-04-05Ravenwood/HostStubGen refactor and bug fixes Makoto Onuki
[Fixed the NPE in the sysui test] - Bug fix: Now native substitution methods can handle bytes correctly. - Spec change: disallow using DisabledOnNonRavenwood on types. It turned out the device side test runner can't handle it if a class rule uses Assume. We could still support it with a non-class rule, but to avoid confusion, let's disallow using it on classes for the time being. - Add more tests - Some refactoring for future changes. Test: ./ravenwood/scripts/run-ravenwood-tests.sh Test: v2/sysui/unit_test on ABTD: https://android-build.corp.google.com/abtd/run/L40000030002931752/ Bug: 292141694 Bug: 332973325 Change-Id: I6d8df1e879840b60326e2beeeee2d8ee7b2ff925
2024-04-04Revert "Ravenwood/HostStubGen refactor and bug fixe" Priyanka Advani
This reverts commit ec5e313efbb08adb3dcb3ce044610338eaf4c29e. Reason for revert: Probable culprit for b/332911993. Will be verifying through ABTD for confirmation and before submitting the revert. Change-Id: I030e2d27d6b897013106b9d73b57b50823ea87c9
2024-04-03Ravenwood/HostStubGen refactor and bug fixe Makoto Onuki
- Bug fix: Now native substitution methods can handle bytes correctly. - Spec change: disallow using DisabledOnNonRavenwood on types. It turned out the device side test runner can't handle it if a class rule uses Assume. We could still support it with a non-class rule, but to avoid confusion, let's disallow using it on classes for the time being. - Add more tests - Some refactoring for future changes. Test: ./ravenwood/scripts/run-ravenwood-tests.sh Bug: 292141694 Change-Id: I6e2fd389ef63d31472f5eafcd9a58ac9e52e8117
2024-02-29Support service dependencies on Ravenwood. Jeff Sharkey
Ravenwood test authors should only need to call setServicesRequired() for the services they directly interact with, but often those services will have indirect dependencies on other OS internals, and those dependencies will evolve over time. To handle this, we add the concept of dependencies to SystemService, where a service declares the other services required to run. (They can choose to omit services from their dependencies where they gracefully handle a missing service at runtime.) Bug: 325506297 Test: atest RavenwoodServicesTest Change-Id: I42187b3494fef499d619ad882891e832b0fd6bca
2024-02-27First pass of "fake" services on Ravenwood. Jeff Sharkey
One of our eventual goals with Ravenwood is to support usage of system services from test code. A recent change added support for "real" services on Ravenwood, and this change expands that to add support for "fake" services. Some services are so tangled with dependencies it would take a long time until we'd be able to run their "real" code. Also, some services with deep hardware dependencies that it can be difficult to add new abstraction layers to support Ravenwood. Finally, we want to support service owners that only have resources to meet the "Pareto principle", where enabling 20% of their functionality on Ravenwood is enough to unblock 80% of test use-cases. Thus, we're supporting teams bringing either "real" or "fake" implementations of their services. Since all test interactions still go through published FooManager and FooManagerInternal-style interfaces, teams can start with a "fake" and slowly transition to using more of their "real" code over time, without having to update test clients. And as a final reminder, because Ravenwood requires test suites like CTS, we're already verifying that "fake" services behave similarly to the "real" services on physical devices. Bug: 325506297 Test: atest CtsContentTestCasesRavenwood Change-Id: I8ed5bd030e03143c15cb9fa945bbdcb0b412611e
2024-02-26Merge "Start loading libandroid_runtime.so" into main Treehugger Robot
2024-02-20First pass of "real" services on Ravenwood. Jeff Sharkey
One of our eventual goals with Ravenwood is to support usage of system services from test code. Robolectric takes the approach of publishing "shadows" which are effectively fakes of the Manager objects visible to app processes, and it unfortunately doesn't offer a mechanism to run "real" services code. In contrast, Ravenwood aims to support API owners progressively offering their system services either via a "fake" approach, or by using various levels of the "real" code that would run on a device. This change wires up the foundational support and uses the simple `SerialManager` example to demonstrate using the same "real" code on both Ravenwood and devices. It also demonstrates the `Internal` pattern being used to customize behavior for tests. To offer as hermetic as a test environment as possible, we start new instances of each requested service for each test. Requiring developers to be explicit about the services they need will help keep overhead low, especially for tests that don't need services. Bug: 325506297 Test: atest RavenwoodServicesTest Change-Id: Ie22436b38f2176f91dfce746b899ebab7752bbb8
2024-02-16Start loading libandroid_runtime.so Makoto Onuki
Enable android.util.Log's native code Test: ./ravenwood/run-ravenwood-tests.sh Bug: 318393625 Change-Id: I0ec607586d71b1cc34b71db67249e110edc304df
2024-02-12Adding test for loading JNI libraries in individual tests Makoto Onuki
Add a bivalent test that uses a native library. Also added a utility method to load it in the same way on both sides. Bug: 318393625 Bug: 323931246 Test: run-ravenwood-tests.sh Test: atest RavenwoodBivalentTest_device Change-Id: I270058c15f718ff20640681742035e33e5e015a1
2024-02-12Add @OnlyOnRavenwood Makoto Onuki
Also add a bivalent test. Test: atest RavenwoodBivalentTest && atest RavenwoodBivalentTest_device Bug: 292141694 Change-Id: I10f258e62e8a7f6a85fad5b39eda27c397e08f55
2024-02-08Remove core-libart-for-host from ravenwood-runtime Makoto Onuki
Test: ./ravenwood/run-ravenwood-tests.sh Test: Treehugger Bug: 324433654 Change-Id: I68048479b15f26b1e9248a90b20de16016f47ef9
2024-02-01Preparing to switch away from the deprecated test runner Makoto Onuki
A lot of ravenwood tests (and other tests too) use the deprecated test runner androidx.test.runner.AndroidJUnit4, but it actually has problems. We should switch them to androidx.test.ext.junit.runners.AndroidJUnit4. However, simply updating all tests could be problematic because: - we need to update the build rules and add "androidx.test.ext.junit" as a static dependency, which is probably safe but it could cause class conflicts.(?) - More importantly, the subtle difference between the test runner could make the device side test fail. So I'm going to do it in two steps: - Step 1 -- this CL: Add an optional validator to RavenwoodTest, which can be enabled with RAVENWOOD_OPTIONAL_VALIDATION=1. This makes a test fail if it's using the deprecated one. - Added a test for this - Added a script to replace the test runner. Test: run-ravenwood-tests Test: RAVENWOOD_OPTIONAL_VALIDATION=1 atest RavenwoodCoreTest Bug: 317131861 Change-Id: I5762bd097c3a529ae6e14460d9e326ed5c6086b4
2024-02-01Background exceptions fail tests, more utils. Jeff Sharkey
Some tests rely on reporting failures from another thread; upstream JUnit quietly eats these exceptions, which can result in misleading "pass" signals when migrating existing tests. To match the behavior of a physical Android device, we now monitor for uncaught exceptions and report them as test failures. Some tests are relying on `ActivityManager` static methods, so offer those on Ravenwood. Leaves "current user" as `USER_SYSTEM` for the moment, but we'll likely think more about how to customize it as part of bringing a real `ActivityManager` online. Some tests rely on `VibrationAttributes` which is a basic holder object, so offer it on Ravenwood. Tests to verify all of above. Bug: 319647875 Test: atest SystemUiRoboTests Test: atest SystemUiRavenTests Change-Id: I1bc5bbc7b4eadf1c6d19c0044012a945ce377a20
2024-01-30Improve Ravenwood logging/messages. Jeff Sharkey
Emit "TestRunner" log messages around each test method, so that our local debugging logs match what developers experience with tests run on a physical device. Refine `onThrowMethodCalled()` message to be more descriptive about Ravenwood and link to docs. Bug: 322817109, 322526754 Test: atest FrameworksCoreTestsRavenwood Change-Id: Id9f6a936145dd2024295c2eb14666fc43a5c7e34
2024-01-29Allow disabling tests even with ENABLE_PROBE_IGNORED Makoto Onuki
A regex in $RAVENWOOD_REALLY_DISABLE is used as an "exclude" filter. If the regex partial-matches the test full name (class name, or class name + "#" + method name), we skip it. Test: RAVENWOOD_RUN_DISABLED_TESTS=1 RAVENWOOD_REALLY_DISABLE='\.CustomTileDefaultsRepositoryTest' atest SystemUiRavenTests and make sure CustomTileDefaultsRepositoryTest is skipped. Bug: 319646274 Change-Id: Id98871aaea6d32e134f84b745f3eae7c9f27931f
2024-01-26Set ENABLE_PROBE_IGNORED from $RAVENWOOD_RUN_DISABLED_TESTS Makoto Onuki
Test: RAVENWOOD_RUN_DISABLED_TESTS=1 atest RavenwoodMockitoTest Without removing @IgnoreUnderRavenwood Bug: 319646274 Change-Id: Ibd80ca5931f500498a1aaa2c18b6209586a82653
2024-01-26Offer `RavenwoodClassRule`. Jeff Sharkey
Some tests interact with yet-unsupported APIs under Ravenwood in their test class constructors, and `RavenwoodRule` arrives too late to effectively apply annotations like `@IgnoreUnderRavenwood`. This change adds `RavenwoodClassRule` which can be marked as an `@ClassRule` so that it runs in a static context before each test class is constructed, giving it a chance to respect annotations. We also adjust our annotation naming to match the naming style in JUnit Jupiter, which has annotations like `DisabledOnJre` and `EnabledOnOs`. Bug: 319647875 Test: atest SystemUiRoboTests Test: atest SystemUiRavenTests Change-Id: I7d834b8e74e961bb3d4befcad6204d99f8fe80e9
2024-01-24Ravenwood support for `SystemProperties`. Jeff Sharkey
One of our final missing pieces of foundational functionality is the SystemProperties key/value store. Over the years, this key/value store has been (ab)used to configure very obscure parts of the OS. As tempting as it might be to simply let code rely on default return values when a key is undefined, we'd like to ensure that code owners carefully confirm any assumed behaviors. To accomplish this, we default to blocking both read/write access to keys until their use has been explicitly audited. Based on our guiding principles, as code owners support their APIs under Ravenwood, they're expected to bring along all relevant tests, which will uncover SystemProperties usage that needs triage, reducing the risk of downstream clients uncovering that usage. Tests can explicitly allow read/write access to specific properties via their RavenwoodRule.Builder definition, which is also how we ensure that all values are consistently reset between tests. Bug: 319647875 Test: atest FrameworksCoreSystemPropertiesTestsRavenwood Test: atest FrameworksCoreTestsRavenwood CtsOsTestCasesRavenwood Change-Id: I6510e06c33ee8b2bf31b58f35faa07127ecd16b7
2024-01-17`RavenwoodRule` opt-in and opt-out support. Jeff Sharkey
For some large suites that are migrating into Ravenwood, it can be helpful to have annotations that can selectively include/exclude tests at both the method and class level. To support this, we add new `Include` and `Exclude` annotations that are named to be symmetric. We continue supporting the existing `IgnoreUnderRavenwood` annotation as being equal to `ExcludeUnderRavenwood`, as `Ignore` can be more descriptive and self-documenting to typical JUnit users. Bug: 319647875 Test: atest SystemUiRavenTests Change-Id: Idf8f836a0f48e61f24dd32dbd8e8cd822b3b6b25
2024-01-08Ignore test methods with $noRavenwood suffix Makoto Onuki
This allows AOSP changes to have `@IgnoreUnderRavenwood` equivalent until the annotations are availabe in AOSP. Bug: 292141694 Test: atest RavenwoodMinimumTest Change-Id: Id1d5a879eb7e31bb99911aae16bdf093c1c93c6e