From 12f67bcf42b0bfcd87478f0c2c1e7c6d0def7989 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 30 Apr 2020 18:08:29 +0100 Subject: 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: I7ebd333079619dba546bc8c4911d567e0287b676 --- sdk/sdk_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sdk/sdk_test.go') diff --git a/sdk/sdk_test.go b/sdk/sdk_test.go index 898ecea68..ae1a4923a 100644 --- a/sdk/sdk_test.go +++ b/sdk/sdk_test.go @@ -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", -- cgit v1.2.3-59-g8ed1b