Retry: Adds support for 'ignored-on-host'

Adds a filter mechanism that can exclude property values from being
included in the common value extraction. That is needed to prevent the
snapshot mechanism from generating invalid output for properties that
are ignored on host (and have their values cleared) and which are not
tagged with `android:"arch_variant"`.

Changes:
* Updates the documentation of SdkMemberType to explain what effect
  the 'ignored-on-host' tag has.
* Adds some tests for this new mechanism.

Bug: 155628860
Test: m nothing
Change-Id: Ibafdb6e921ba5abe505bd8a91ca5a1d9c9b5d0cb
This commit is contained in:
Paul Duffin
2020-04-30 18:08:29 +01:00
parent 864e1b45db
commit c459f89fb4
3 changed files with 58 additions and 1 deletions

View File

@@ -289,9 +289,12 @@ func TestCommonValueOptimization(t *testing.T) {
}
extractor := newCommonValueExtractor(common)
extractor.extractCommonProperties(common, structs)
h := TestHelper{t}
err := extractor.extractCommonProperties(common, structs)
h.AssertDeepEquals("unexpected error", nil, err)
h.AssertDeepEquals("common properties not correct",
&testPropertiesStruct{
name: "common",