First pass of "real" services on Ravenwood.
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
Loading
Please register or sign in to comment