Skip to content
Snippets Groups Projects
  1. Nov 21, 2023
    • Jeff Sharkey's avatar
      Support Handler/Looper for Ravenwood, with CTS. · 1c7db6b9
      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
      1c7db6b9
  2. Nov 20, 2023
    • Jeff Sharkey's avatar
      More `android.util` internals, with tests. · ce9f0d06
      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
      ce9f0d06
  3. Nov 16, 2023
    • Jeff Sharkey's avatar
      Support TextUtils for Ravenwood, with CTS. · cb4a047e
      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
      cb4a047e
    • Jeff Sharkey's avatar
      Build `ravenwood-junit` against `test_current`. · 41cfbb3f
      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
      41cfbb3f
  4. Nov 15, 2023
    • Jeff Sharkey's avatar
      Remind ourselves why @IgnoreUnderRavenwood. · 36b2f512
      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
      36b2f512
    • Jeff Sharkey's avatar
      Support android.database for Ravenwood, with CTS. · 2acaa723
      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
      2acaa723
    • Jeff Sharkey's avatar
      [1/?] Support android.content for Ravenwood. · 73067713
      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
      73067713
    • Jeff Sharkey's avatar
      PersistableBundle for Ravenwood, with CTS. · 4ee8a655
      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
      4ee8a655
  5. Nov 13, 2023
    • Jeff Sharkey's avatar
      More android.os work for Ravenwood, with CTS. · 9e4b2c12
      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
      9e4b2c12
    • Makoto Onuki's avatar
      Ravenwood: Add device test to RavenwoodMockitoTest · 88ea9ba9
      Makoto Onuki authored
      Test: atest RavenwoodMockitoTest RavenwoodMockitoTest_device
      Bug: 310268946
      Bug: 292141694
      Change-Id: Iaf0f689d5513a1a4dce4d756aad2152202d72e6d
      88ea9ba9
    • Jeff Sharkey's avatar
      Initial Process and Binder support, with CTS. · 5e210d7d
      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
      5e210d7d
  6. Nov 10, 2023
  7. Nov 08, 2023
    • Jeff Sharkey's avatar
      Support Parcel, Bundle under Ravenwood, with CTS. · 91f414e4
      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
      91f414e4
  8. Oct 31, 2023
    • Anton Hansson's avatar
      Trim leading src-dir from Ravenwood sources · d82cbc7c
      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
      d82cbc7c
  9. Oct 10, 2023
    • Makoto Onuki's avatar
      Update OWNERS for ravenwood · 7eb26bf6
      Makoto Onuki authored
      Test: tree hugger
      Bug: 292141694
      Merged-in: If4d650dc175a5a78cf8844dfed2217c19f2d5790
      Change-Id: I19ed7505bfd0c71d811f98409542688094944aeb
      7eb26bf6
  10. Oct 09, 2023
    • Makoto Onuki's avatar
      Start adding build rules for ravenwood · 3aefe338
      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
      3aefe338
Loading