From e509447c9348f5dbfc29393665d74caab9ad22c6 Mon Sep 17 00:00:00 2001 From: Greg Kaiser Date: Fri, 8 May 2020 19:12:34 +0000 Subject: Revert "Detect invalid arch specific properties in snapshot" Revert submission 1302576 Bug: 156054601 Reason for revert: Presumed root cause of build break. Reverted Changes: Ifc8116e11:Detect invalid arch specific properties in snapsho... I7ebd33307:Adds support for 'ignored-on-host' I167b47a13:Fix snapshot of a host/device cc_library with stub... Change-Id: Id7eba0bdde5c579e10e9b42d94a7cfab5f34995f --- sdk/sdk_test.go | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) (limited to 'sdk/sdk_test.go') diff --git a/sdk/sdk_test.go b/sdk/sdk_test.go index 898ecea68..095f83607 100644 --- a/sdk/sdk_test.go +++ b/sdk/sdk_test.go @@ -226,8 +226,8 @@ func TestSDkInstall(t *testing.T) { } type EmbeddedPropertiesStruct struct { - S_Embedded_Common string `android:"arch_variant"` - S_Embedded_Different string `android:"arch_variant"` + S_Embedded_Common string + S_Embedded_Different string } type testPropertiesStruct struct { @@ -235,11 +235,11 @@ type testPropertiesStruct struct { private string Public_Kept string `sdk:"keep"` S_Common string - S_Different string `android:"arch_variant"` + S_Different string A_Common []string - A_Different []string `android:"arch_variant"` + A_Different []string F_Common *bool - F_Different *bool `android:"arch_variant"` + F_Different *bool EmbeddedPropertiesStruct } @@ -346,26 +346,3 @@ func TestCommonValueOptimization(t *testing.T) { }, structs[1]) } - -func TestCommonValueOptimization_InvalidArchSpecificVariants(t *testing.T) { - common := &testPropertiesStruct{name: "common"} - structs := []propertiesContainer{ - &testPropertiesStruct{ - name: "struct-0", - S_Common: "should-be-but-is-not-common0", - }, - &testPropertiesStruct{ - name: "struct-1", - S_Common: "should-be-but-is-not-common1", - }, - } - - extractor := newCommonValueExtractor(common) - - h := TestHelper{t} - - err := extractor.extractCommonProperties(common, structs) - h.AssertErrorMessageEquals("unexpected error", `field "S_Common" is not tagged as "arch_variant" but has arch specific properties: - "struct-0" has value "should-be-but-is-not-common0" - "struct-1" has value "should-be-but-is-not-common1"`, err) -} -- cgit v1.2.3-59-g8ed1b