Skip to content
Commit a97f246b authored by Victor Hsieh's avatar Victor Hsieh
Browse files

Add tests for preload and APEX measurement

A new host-side test "BinaryTransparencyHostTest" is added to drive the
actual test on device. The host can be used to set up the testing
environment (e.g. update a preload, or later install MBA), then ask the
helper app "BinaryTransparencyTestApp" to verify returned value of
private APIs in the main service.

Since the APIs are private (@hide, because we're not ready to make
anything public yet), the (bundled) helper app needs to be compiled with
`platform_apis: true`.

Plus, since the service is not accessible to apps by sepolicy, the test
has to run with SELinux disabled. An alternative is to add a
userdebug_or_eng rule in sepolicy, but it's better to avoid adding rule
for one specific test, and isolate the setup here (in AndroidTest.xml).

The test is not yet added to TEST_MAPPING/presubmit. Once it runs
successfully for a few runs in postsubmit, we should graduate it to
presubmit.

Test: atest BinaryTransparencyHostTest
Test: atest BinaryTransparencyServiceTest
Bug: 265244016
Change-Id: Ibd87f4cf6a2ae989ddfa8eaf9494cff5d34005ed
parent 90ec42c2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment