Skip to content
Snippets Groups Projects
  1. Feb 28, 2024
    • Makoto Onuki's avatar
      Fix typo, etc · f96aa34f
      Makoto Onuki authored
      Bug: 292141694
      Test: TH
      
      Change-Id: I96c5999679e52cb6db8a47c029291702ed4832a8
      f96aa34f
    • Makoto Onuki's avatar
      Temporarily disable test_compare_to_golden · 2fef277d
      Makoto Onuki authored
      Bug: 326897452
      Test: atest tiny-framework-dump-test # make sure the test won't run
      Change-Id: I8d674d0819a03e95a9e2400c6d4284588edc8794
      2fef277d
    • Pablo Gamito's avatar
      Increment protolog version · 9abac8a7
      Pablo Gamito authored
      Because we now dump 64 bit integers instead of 32 bit integers we need to have a different protolog version so we know which viewer config to use in Winscope
      
      Bug: 327002914
      
      Test: collected protolog trace in Winscope
      Change-Id: Iab3071952ff7957a11a0f01f09cfaa4306a7f7ae
      9abac8a7
  2. Feb 26, 2024
  3. Feb 22, 2024
    • Pablo Gamito's avatar
      Update ProtoLog build rules · 5fe2c80e
      Pablo Gamito authored
      ProtoLogTool now has additional parameters to support Perfetto tracing. We also need to generate and include a proto version of the viewer configuration.
      
      Flag: ACONFIG android.tracing.Flags.perfettoProtolog DEVELOPMENT
      Test: mp droid && atest FrameworksServicesTests
      Bug: 276432490
      Change-Id: I26929eed96faae04bec65ae5eaf86afda75cb83c
      5fe2c80e
    • Pablo Gamito's avatar
      Refactor ProtoLogImpl to support Perfetto tracing with flag better · 0ce7d7ce
      Pablo Gamito authored
      Flag: ACONFIG android.tracing.Flags.perfettoProtolog DEVELOPMENT
      Bug: 276432490
      Test: atest FrameworksServicesTests
      Change-Id: If95bfeeaff491ce51b61e34d2f8c22d8b635912d
      0ce7d7ce
    • Pablo Gamito's avatar
      Update ProtoLogTool · 44fe3a9a
      Pablo Gamito authored
      Generate the impl classes and support writing the viewer config to a proto file
      
      Flag: ACONFIG android.tracing.Flags.perfettoProtolog DEVELOPMENT
      Bug: 276432490
      Test: atest FrameworksServicesTests
      Change-Id: I69956b5ef2b8b48a98860aa3b8579521480d7bc0
      44fe3a9a
    • Pablo Gamito's avatar
      Update ProtoLogTool commands args · 329813a9
      Pablo Gamito authored
      We need these new parameters to inject those values into the generated classes so we don't have to manually create an impl of these class and passing those values manually.
      
      Flag: ACONFIG android.tracing.Flags.perfettoProtolog DEVELOPMENT
      Bug: 276432490
      Test: atest FrameworksServicesTests
      Change-Id: I32906cbe37c7c3899d7c487d5ed341381a05fdf1
      329813a9
    • Pablo Gamito's avatar
      Update ProtoLog hash function to 64 bit · 01e08016
      Pablo Gamito authored
      To avoid hash collisions now that we have more messages.
      
      Flag: ACONFIG android.tracing.Flags.perfettoProtolog DEVELOPMENT
      Bug: 276432490
      Test: atest FrameworksServicesTests
      Change-Id: Ia252f1fc60deb2beaf177b0782a8723e39f90a7e
      01e08016
    • Pablo Gamito's avatar
      Extract LogLevel to common package · f44daf99
      Pablo Gamito authored
      Since we now use it in a few different places including in the ProtoLogTool.
      
      Flag: ACONFIG android.tracing.Flags.perfettoProtolog DEVELOPMENT
      Bug: 276432490
      Test: atest FrameworksServicesTests
      Change-Id: Iba3a4904ea0b5e27afb1486c765e627fb343f6af
      f44daf99
  4. Feb 15, 2024
    • Makoto Onuki's avatar
      [Hoststubgen] Allow to apply policy based on inheritance · 3e12731d
      Makoto Onuki authored
      Use "*" + base class/interface name in the policy file to define
      an inheritance based policy.
      
      Wrote it to investigate classpath conflicting problem.
      
      It's not actually used on ravenwood. (at least yet)
      
      Test: ./ravenwood/run-ravenwood-tests.sh
      Bug: 292141694
      Change-Id: I173e2545a1ad9e0bc374d6798e1558dacc3569bd
      3e12731d
  5. Feb 14, 2024
    • Makoto Onuki's avatar
      Include hoststubgen tests in run-ravenwood-tests.sh · d347a616
      Makoto Onuki authored
      And remove the stale run-all-tests.sh.
      
      Bug: 315031371
      Test: ./ravenwood/run-ravenwood-tests.sh
      Change-Id: I2ac6457b1f60017c6e4e506ca11dbd7fc18dfa59
      d347a616
    • Dan Willemsen's avatar
      Set static timestamps in protologtool output · d0473319
      Dan Willemsen authored
      When build outputs are deterministic, that helps improve the RBE cache
      hit rate.
      
      Bug: 325124724
      Test: m out/soong/.intermediates/frameworks/base/libs/WindowManager/Shell/wm_shell_protolog_src/6c826b466f2421b82c3ec7d86f8481e7/gen/wm_shell_protolog.srcjar; zipinfo $!
      Change-Id: I838eb379531ae5434d576828e6be43663122187b
      d0473319
  6. Feb 13, 2024
    • Makoto Onuki's avatar
      Move "runtime helpers" to f/b/ravenwood · 053eac85
      Makoto Onuki authored
      - Also make sure framework-minus-apex is prioritized
      - Also some build rule cleanup
      
      Bug: 315031371
      Test: ./ravenwood/run-ravenwood-tests.sh
      
      Change-Id: I2d0eb822517abfc17f351810a53176ad9904f908
      053eac85
  7. Feb 12, 2024
    • Jeff Sharkey's avatar
      hoststubgen: Slightly refined stats. · fae66ea5
      Jeff Sharkey authored
      To give more accurate statistics, focus only on public non-abstract
      methods.  Shift measurement back to `BaseAdapter`, but only collect
      stats when operating in the `impl` mode; this ensures we're early
      enough to accurately count `substitute-from` methods.
      
      Also ignore common generated code like Protos, StatsLog, and
      LogTags, as we'll eventually be handling them all in a more
      consistent way.
      
      Bug: 324417456
      Test: atest FrameworksCoreTestsRavenwood
      Change-Id: I07e0ea4107b27dbfa241c48c9f05def445b78cfe
      fae66ea5
    • Jeff Sharkey's avatar
      Human-readable XML on Ravenwood. · 1e92835f
      Jeff Sharkey authored
      We had temporarily been using the binary XML implementation in all
      situations, but this change brings in the existing `kxml2-android`
      library to offer reading/writing of human-readable XML.  We also
      use the upstream SAX parser to offer an event-based parser.
      
      In all cases we carefully keep the existing XML libraries in place
      untouched on physical devices to avoid regressions.
      
      Bug: 324417456
      Test: atest CtsUtilTestCasesRavenwood
      Test: atest FrameworksCoreTestsRavenwood
      Test: atest FrameworksUtilTestsRavenwood
      Change-Id: I2effc7fca5c586968658073f9652d13cf50a2c66
      1e92835f
    • Pablo Gamito's avatar
      Add ProtoLog owners files · 2605a438
      Pablo Gamito authored
      Test: n/a
      Change-Id: I6e8a3f288a231f44e0df20b52f0bbf6a0ca08460
      2605a438
  8. Feb 09, 2024
    • Jeff Sharkey's avatar
      hoststubgen: Emit stats for dashboarding. · d2cc1917
      Jeff Sharkey authored
      As we expand our audience, developers will be interested in knowing
      what APIs are supported through a top-down dashboard view that we
      can continually update over time.
      
      This change emits a statistics CSV that can be easily bulk-imported
      to generate a dashboard.
      
      Bug: 322895594
      Test: TH
      Change-Id: Idea55b64cdb79e9a49f63340f83a1b395f8e5ec7
      d2cc1917
    • Dmitri Plotnikov's avatar
      Transition more PowerStats tests to Ravenwood · 77d4ceea
      Dmitri Plotnikov authored
      Bug: 314797745
      Test: atest PowerStatsTestsRavenwood PowerStatsTests FrameworksCoreTests
      Change-Id: I24bfe2e5c587e9547411ce5165d2fdd4c47b0e2b
      77d4ceea
  9. Feb 08, 2024
    • Jeff Sharkey's avatar
      Basic `ParcelFileDescriptor` on Ravenwood. · 6f218ec3
      Jeff Sharkey authored
      One of the final foundational building blocks, which wraps a Java
      `FileDescriptor` object.  Since many of the existing APIs here offer
      to work with "raw" int FD values, we need to reach "behind the
      curtain" to read/write the internal value.  Thankfully `SharedSecrets`
      already offers a way to gain access without requiring us to open
      up the entire `java.io` area of the `java.base` module.
      
      Bring along `android.util.CloseGuard` as a no-op wrapper.
      
      Bug: 324417456
      Test: atest CtsOsTestCasesRavenwood
      Change-Id: I8cffacf96d94aea2d40d75055a2411717e0c1bcf
      6f218ec3
  10. Feb 05, 2024
  11. Feb 02, 2024
    • Nelson Li's avatar
      Adding dist for aapt2_results · ffe60238
      Nelson Li authored
      In the previous transition to Android.bp change(aosp/2935114), the
      $(call dist-for-goals,aapt2_run_host_unit_tests, ...) was overlooked.
      This change added `dist` for `aapt2_results` to fix this issue.
      
      Bug: 322285259
      Test: m -j aapt2_run_host_unit_tests dist;
            Then, check ./out/dist/gtest/aapt2_host_unit_tests_result_x86.xml
            and ./out/dist/gtest/aapt2_host_unit_tests_result_x86_64.xml
      Change-Id: Ieaa67fef4a47b08fd97f3dc1810f4cd1933f155d
      ffe60238
  12. Feb 01, 2024
  13. Jan 30, 2024
    • Jeff Sharkey's avatar
      Ravenwood support for `wtf()`, wrap logging. · 587b3bec
      Jeff Sharkey authored
      There are some tests triggering `wtf()` during the normal course of
      operation, and we haven't been able to reproduce them yet.  This
      change gives us a valid `wtf()` implementation to aid debugging.
      
      It's also a bit jarring to have log-style messages interleaved with
      raw `System.out`, so also add `redirectLogStreams()` to match the
      logging behavior that developers observe on physical devices.
      
      Bug: 322805216
      Test: atest FrameworksCoreTestsRavenwood FrameworksUtilTestsRavenwood
      Change-Id: I8ea2d12638cd998e3962aaa8af09a3335fcd0d51
      587b3bec
    • Jeff Sharkey's avatar
      Improve Ravenwood logging/messages. · 3d14bf44
      Jeff Sharkey authored
      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
      3d14bf44
    • Nelson Li's avatar
      Convert `aapt2_run_host_unit_tests` to Android.bp · 08b87e4c
      Nelson Li authored
      The handling of `declare-1p-target` will be deferred for future
      processing.
      
      Bug: 322285259
      Test: m aapt2_results
      Test: m aapt2_run_host_unit_tests
      Test: m -j out/host/linux-x86/gen/META/lic_intermediates/./out/soong/.intermediates/frameworks/base/tools/aapt2/aapt2_results.meta_lic
      Change-Id: I65ff18c9f4b490726011a490ba9045bf2078068e
      08b87e4c
  14. Jan 29, 2024
    • Jeff Sharkey's avatar
      Offer `TestLooperManager` on Ravenwood. · c91451a6
      Jeff Sharkey authored
      Common test utilities like `TestableLooper` rely on being able to
      drive `Looper` interactions via `TestLooperManager` which can only
      be obtained via `Instrumentation`.
      
      This change integrates with the common `InstrumentationRegistry`
      library which is how most tests obtain their `Instrumentation`
      instance.  We play an odd dance with `java_host_for_device` and
      `java_device_for_host` to get a version of `androidx.test.monitor`
      that we can link against our runtime.  (The build system otherwise
      gets excited that we're trying to compile an Android-linked library
      into what appears to be a Java-linked library, but we know that we're
      offering the Android runtime.)
      
      Fix subtle bug in `MessageQueue_host` where a requested wake might
      race with the `for (;;)` loop in `MessageQueue.next()`; if a wake is
      pending, it's a valid reason to return from `nativePollOnce()`.
      
      Add timeout logic to `RavenwoodRuleImpl` which can be enabled to
      dump all our stack traces just before Tradefed times out, to aid in
      debugging deadlocks; disabled by default.
      
      Bug: 319647875
      Test: atest SystemUiRoboTests
      Test: atest SystemUiRavenTests
      Test: atest FrameworksCoreTestsRavenwood:TestLooperManagerTest
      Change-Id: I13605d32df0c3e6758f541d5e75a6bdaf44368db
      c91451a6
  15. Jan 26, 2024
    • William Loh's avatar
      Add <uri-relative-filter-group> to intent filters. · d3145843
      William Loh authored
      Introduce new <uri-relative-filter-group> tag to define a new matching
      rule where all matchers in the group must match. Each rule group will be
      evaluated in the order they are defined in the manifest. These rules
      will only be evaluated if no matches found in mDataPaths.
      
      Each URI relative filter group can define matchers for URI fragments and
      queries in addtion to paths.
      
      Bug: 307556883
      Test: atest CtsContentTestCases:IntentFilterTest
      Test: atest PackageParserTest
      Change-Id: Ida1c7a1440b99fd5af2913e5c10c6886c511256f
      d3145843
  16. Jan 25, 2024
    • Mark Punzalan's avatar
      [aapt2] Always generate code for permissions · 12dc2b8a
      Mark Punzalan authored
      We will generate the String constant in Manifest.java for a permission
      or permission group even if it is removed via feature flag. This is so
      that code referencing the string will still compile.
      
      Bug: 297373084
      Bug: 318014882
      Test: atest aapt2_tests
      Test: Modified framework-res to build with SDK version 34 and forced
      removal of a permission with a disabled feature flag. The entire
      Android source could still be built even if the framework-res.apk no
      longer had the removed permission in the manifest.
      
      Change-Id: I982a8988e35e09e73bcbe065f0d7cf47c2907d54
      12dc2b8a
  17. Jan 24, 2024
    • Jeff Sharkey's avatar
      Ravenwood support for `SystemProperties`. · 950697a4
      Jeff Sharkey authored
      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
      950697a4
  18. Jan 19, 2024
  19. Jan 18, 2024
  20. Jan 17, 2024
    • Jeff Sharkey's avatar
      Offer `core-libart-for-host` under Ravenwood. · 5cb49a3a
      Jeff Sharkey authored
      Ravenwood is a deviceless testing environment that runs in a host
      JVM, similar to Robolectric.
      
      As we're working on onboard existing SystemUI tests that expect
      parity with Robolectric, we're needing to offer the same baseline
      Robolectric functionality, so we expand the visibility of
      `core-libart-for-host` to only the top-level of "//frameworks/base"
      which is where Ravenwood.bp is defined.  (We're not exposing the
      library to any subpackages.)
      
      Bug: 319647875
      Test: atest SystemUiRavenTests
      Change-Id: I02185deb302aa764a6970de848d82788f7d07e19
      5cb49a3a
  21. Jan 11, 2024
    • Nelson Li's avatar
      Remove unused Android.mk in NamespaceTest · a276b963
      Nelson Li authored
      After checking, the modules under these directories can not be built
      because the upper-level directories lack Android.mk.
      Even if these Android.mk are included, they cannot be tested correctly
      with atest.
      
      Bug: 319568429
      Test: N/A
      Change-Id: I797d2327e340fcd38cde03dd0f520ec756be5fc3
      a276b963
    • Nelson Li's avatar
      Remove unused Android.mk in MergeOnlyTest · a8bb9e40
      Nelson Li authored
      After checking, the modules under these directories can not be built
      because the upper-level directories lack Android.mk.
      In addition, the format of the Android.mk in these directories is also
      incorrect, and if it is included, it will cause the build to break.
      
      Bug: 319565408
      Test: N/A
      Change-Id: I1a7b2fc2ad78bcbcd6cd3f65c0a5043656711dae
      a8bb9e40
  22. Jan 10, 2024
    • Mark Punzalan's avatar
      [aapt2] Allow multi-line argument files · 8c4d4ea3
      Mark Punzalan authored
      Previously, aapt2 would read arguments from files but they all have to
      be in one line, separated by spaces. Now they can be spread over
      multiple lines in the file.
      
      Bug: 297373084
      Bug: 315329624
      Test: Called `aapt2 link ... --feature_flags @args.txt` with args.txt
      containing flag values over multiple lines. Verified the resulting APK
      has the expected output.
      
      Change-Id: I91be6c7a869f63eafd88c04de69401d248f05545
      8c4d4ea3
  23. Jan 05, 2024
    • Mark Punzalan's avatar
      [aapt2] Use FeatureFlagsFilter in link command · 4b564ded
      Mark Punzalan authored
      The behavior of the filter depends on the minSdkVersion. If > UDC,
      manifest elements will be untouched. Otherwise, they will be removed
      depending on the value of the flag in the `android:featureFlag`
      attribute.
      
      Bug: 297373084
      Test: atest aapt2_tests
      Change-Id: Ib07c45752a4cc00bfdae7fedc745ce267ec7082a
      4b564ded
  24. Dec 18, 2023
    • Makoto Onuki's avatar
      Clean up HostStubGen directory · 8bcc6281
      Makoto Onuki authored
      Remove obsolete directories
      
      Test: ./scripts/run-all-tests.sh
      Bug: 292141694
      Change-Id: I2124831ed61f50effca80c64005eb0933fd87016
      8bcc6281
  25. Dec 15, 2023
    • Dmitri Plotnikov's avatar
      Enable CursorWindow for Ravenwood · 62b54d65
      Dmitri Plotnikov authored
      Bug: 314797745
      Test: atest FrameworksCoreTestsRavenwood
      Test: atest FrameworksCoreTests
      Change-Id: I118b6ba36bdc85d5b712aed0f0e80bb9a9fc3125
      62b54d65
    • Tor Norbye's avatar
      Update EnforcePermissionFix to set fix name · 9bb21bc2
      Tor Norbye authored
      Lint now forces you to explicitly set an explicit
      display name for composite quick fixes (it used to
      just default to the nested quickfix' display name,
      but this is sometimes misleading so now lint checks
      need to explicitly do this.)
      
      Test: SimpleManualPermissionEnforcementDetectorTest.kt
      Bug: Not filed
      Change-Id: Ie46d32833efc7bd9f7051acf6b45327d4fda7927
      9bb21bc2
Loading