Commit Graph

3 Commits

Author SHA1 Message Date
Mårten Kongstad
0ae74f86ba aconfig: include all tests in TEST_MAPPING
The aconfig tests used to be implicitly run by Treehugger, but something
has changed and Treehugger no longer verifies aconfig uploads. Fix this
by explicitly listing all aconfig tests in the TEST_MAPPING file.

Treehugger does not allow new tests in presubmit before they have proven
themselves (in terms of flakiness and execution speed) in postsubmit.
For this reason this CL adds the tests to postsubmit; a follow-up CL
will move them to presubmit.

This has the added benefit of allowing developers to easily run all
tests locally, either by

  $ atest

if current working directory is build/tools/aconfig or one of its
subdirectories, or

  $ atest --test-mapping $(gettop)/build/tools/aconfig

from anywhere in the Android tree.

Also add all tests to "general-tests" to enable Treehugger to run them.
Move aconfig.test from "device-tests" to "general-tests"; the former
group is intended for tests that depend on device-specific
functionality. See [1] for more info.

1. https://source.android.com/docs/core/tests/development/test-mapping

Bug: N/A
Test: atest --test-mapping $(gettop)/build/tools/aconfig
Change-Id: If857733834c8ad43a16e6162e50e6b1f713f979d
2023-12-12 14:05:15 +01:00
Mårten Kongstad
3bb7988492 printflags: include device_config values
Amend the default flag values read from
/<partition>/etc/aconfig_flags.pb with the currently used values as
stored in device_config.

Bug: 301547297
Test: atest printflags.test
Test: adb shell printflags
Change-Id: Ic11702a0ae093d2e9dc3ff543b5ca0684b67e0dc
2023-09-27 10:42:04 +02:00
Mårten Kongstad
433fab94c8 printflags: introduce device tool to print feature flags
Metadata about all feature flags used on device are located in
/<partition>/etc/aconfig_flags.pb. Add a new tool, printflags, to read
and pretty-print these files.

printflags is only intended for debugging purposes.

Bug: 301547297
Test: adb shell printflags
Change-Id: I0a3277fecfc8a60eea0aa6bf362a25a311360b71
2023-09-22 13:47:49 +02:00