summaryrefslogtreecommitdiff
path: root/ravenwood/junit-impl-src
AgeCommit message (Collapse)Author
2025-03-12Merge "[Ravenwood] Remove deprecated usage" into main John Wu
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-07Add tests for resource flags Makoto Onuki
- Flags work, except all RW flags are treated as "enabled". - Also enable tests that no longer need to be disabled - Also added a java system prop that has the runtime directory path Bug: 396458006 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh -s Flag: EXEMPT host test change only Change-Id: I0402da0ba59c27c17b6dd4d2f646cdee7800a290
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
2025-02-18[Ravenwood] Enable graphics support John Wu
Bug: 337110712 Flag: EXEMPT host side change only Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Test: atest FrameworksCoreTestsRavenwood Test: atest CtsGraphicsTestCasesRavenwood Test: atest CtsResourcesTestCasesRavenwood Test: atest CtsTextTestCasesRavenwood Change-Id: I90a79a92987870d494ed927eb6ba02747e247929
2025-02-14Add a better "method call" (optional) log Makoto Onuki
This logger prints the method name with the thread ID and indentation according to the call nest level. We also omit logging for certain "uninteresting" methods. Flag: EXEMPT host test change only Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh -s Test: Manual test: Enable logging by uncommenting --default-method-call-hook in ravenwood-standard-options.txt, and check the output Change-Id: I62084ffad3fff7e11b4b0ec7fd8b682a2a8aceff
2025-01-30Dump various runtime info at startup Makoto Onuki
Flag: EXEMPT host test change only Bug: 342688475 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh -s Change-Id: I72ad649b082a69614cd7a99905a582a0dd3ae033
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-26Merge "[Ravenwood] Merge libinit and libsysprop" into main Treehugger Robot
2024-11-26[Ravenwood] Merge libinit and libsysprop John Wu
Flag: EXEMPT host test change only Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: Ie475a13f979ee8aaceb19adf8525e16654f6da20
2024-11-26[Ravenwood] Update core property access check John Wu
Flag: EXEMPT host test change only Bug: 377765941 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: Ie8d1099c63b638927f22d8229a9244b6bb011e31
2024-11-25Merge "Make the log format more realistic" into main Makoto Onuki
2024-11-25Make the log format more realistic Makoto Onuki
Now the log format is mostly same as the device one. Flag: EXEMPT host test change only Bug: 292141694 Test: atest RavenwoodBivalentTest Change-Id: I569b4b042f7c567f263b5638933ad90c6e1e5f7d
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-22[Ravenwood] Fully remove RavenwoodConfig support John Wu
At the same time, relax some RavenwoodRule checks since RavenwoodRule is now just a normal JUnit rule. Flag: EXEMPT host test change only Bug: 377765941 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: Ia3f8afd61f8636f458e0eafae4b75139f5bc14b9
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-18Dump JVM arguments on startup Makoto Onuki
Flag: EXEMPT host test change only Bug: 371602426 Test: atest RavenwoodBivalentTest, check the log Change-Id: I061dad98f1e1f2ebea3dba41a48307c96b990010
2024-11-16Merge "Set package name via the build file, not via Config." into main Makoto Onuki
2024-11-15Do not mask exceptions from initialization Makoto Onuki
Flag: EXEMPT host test change only Bug: 379184974 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: I0918856ffab2225e530fe8b663cdccfedf03b5fb
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-13Compat-framework on ravenwood Makoto Onuki
Flag: EXEMPT host test change only Bug: 367706429 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Merged-In: Ibef0180fe3e5acb919cb6cbab09574c508e6d894 Change-Id: Ia6cd79b9468542ed845b028317ae967e48ea8e88
2024-11-13Revert "Compat-framework on ravenwood" Makoto Onuki
This reverts commit 7261855ac79a5ff177face7c02a161440a4f620b. Reason for revert: b/378945472 Change-Id: Id22aeb4d95f129ab59b338fabc551e78938effc9
2024-11-13Compat-framework on ravenwood Makoto Onuki
Flag: EXEMPT host test change only Bug: 367706429 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: Ibef0180fe3e5acb919cb6cbab09574c508e6d894 Merged-In: Ibef0180fe3e5acb919cb6cbab09574c508e6d894
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-05When globalInitOnce() fails, don't run any tests Makoto Onuki
Flag: EXEMPT host test change only Fix: 377523110 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: I9dc3570349bf9befeb89a3372f0ecdf572e9a452
2024-11-05Switch back to Java android.util.Log Makoto Onuki
- Log is an important class, so this should always work even when globalInitOnce fails(). - Also handle $RAVENWOOD_LOG_OUT at the very first. Flag: EXEMPT host test change only Fix: 377377826 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Test: RAVENWOOD_LOG_OUT=$(tty) atest RavenwoodBivalentTest # and make sure the log is printed on console. Change-Id: I7c4aea4e12f983a28acb1768ac7ccbf8795b64da
2024-11-01Merge "More precise test summary" into main Treehugger Robot
2024-11-01More precise test summary Makoto Onuki
Now ravenwood-test-summary *should* match the atest output -- unless the test uses junit3 based tests, or @NoRavenizer. Flag: EXEMPT host test change only Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh and run ./scripts/ravenwood-test-summary Also do this after breaking a test Change-Id: I3c5c67416ff9f1eca0c194485b366741bd0829e8
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-11-01Fix RAVENWOOD_VERBOSE for liblog Makoto Onuki
Now RAVENWOOD_VERBOSE=1 will correctly enable Log.v and Log.d Flag: EXEMPT host test change only Bug: 292141694 Test: RAVENWOOD_VERBOSE=1 atest RavenwoodBivalentTest, make sure Log.v() output is logged. Change-Id: Id2dd12f1004dcfc3fd10be10fcea61362c9d58fb
2024-10-29Merge "[Ravenwood] Update RATR to setup environment ASAP" into main John Wu
2024-10-29Merge "[Ravenwood] Cleanup RATR implementation and project structure" into main John Wu
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-25Fix how we delete the symlink Makoto Onuki
The previous way of checking the file existance would be fooled if the symlink exists but the target doesn't. Flag: EXEMPT host test change only Fix: 369687596 Test: manual $ rm /tmp/Ravenwood-stats_CtsOsTestCasesRavenwood_2*.csv # remove only the target $ atest CtsOsTestCasesRavenwood Change-Id: I84c94ca5913182a06422f71743a3b809ab805fda
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-24Add a script to dump latest test result summary. Makoto Onuki
Also now we count assumption failures as skip properly Flag: EXEMPT host test change only Bug: 292141694 Test: ./ravenwood-test-summary Change-Id: Ia756eff4fb9b619ae91372b4769428d2ef288e33
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-18[Ravenwood] Recreate UiAutomation mocks for each test John Wu
Mockito.framework().clearInlineMock() may make our mock stop working. Always recreate the mock for each tests. Bug: 368364157 Flag: EXEMPT host test change only Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: Ibcaa7800a1ef905edfb9ceb48e6f84c0a9cf341f
2024-10-17Merge "[Ravenwood] Support DeviceConfig" into main Treehugger Robot
2024-10-17[Ravenwood] Support DeviceConfig John Wu
Flag: EXEMPT host test change only Bug: 368591527 Test: atest CtsDeviceConfigTestCasesRavenwood Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: I696b857f7f724517314444c35effdccadbc7adac Merged-In: I920c65840776669acee4783e0f2ca23aecc0ea1b
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-10-09[Ravenwood] Mock UiAutomation to support permission APIs John Wu
On Ravenwood, since there are no "permissions", we can provide no-op implementations for adopt/drop shell permissions method families in UiAutomation. To prevent pulling in a lot of unnecessary internal dependencies of UiAutomation, we simply inject a mock UiAutomation in our Instrumentation class. Flag: EXEMPT host test change only Bug: 292141694 Test: atest RavenwoodBivalentTest Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: I8826a8c491efa5fc8d6cb10cf11c6dd677ad7f31
2024-10-04[Ravenwood] Add runtime Mockito version check John Wu
To prevent future Ravenwood tests from using an incorrect Mockito version, add this new runtime environment check. Bug: 292141694 Flag: EXEMPT host test change only Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: I52303e744465c26721baaba85aded907af2a06eb
2024-09-28[Ravenwood] Several minor fixes John Wu
- Fix typo in RavenwoodTestStats - Fix incorrect return value in property_set Bug: 292141694 Flag: EXEMPT host test change only Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: Iaac7a804719a6941f0ee18f45274a597a394393c
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