From c459f89fb46e163eb57f1fc41e4a79383785db32 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 30 Apr 2020 18:08:29 +0100 Subject: 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 --- 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