summaryrefslogtreecommitdiff
path: root/android/config_test.go
diff options
context:
space:
mode:
author LaMont Jones <lamontjones@google.com> 2024-10-30 01:03:28 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-10-30 01:03:28 +0000
commitbef36af55ac6f97002eb51ed251bad3cf652ff27 (patch)
tree1eface58f55495f9df48ec0b21d6bdd3a99313b8 /android/config_test.go
parent768b00f9001e65656b4b46dac705ba375b0b0b1b (diff)
Revert "Only use partial compile on eng builds"
This reverts commit 768b00f9001e65656b4b46dac705ba375b0b0b1b. Reason for revert: b/365536323 due to envvar overrides. Change-Id: Ibcafddd9a84d5e15362efce77691b45702f2420e
Diffstat (limited to 'android/config_test.go')
-rw-r--r--android/config_test.go45
1 files changed, 0 insertions, 45 deletions
diff --git a/android/config_test.go b/android/config_test.go
index adb5ffac5..773216844 100644
--- a/android/config_test.go
+++ b/android/config_test.go
@@ -212,48 +212,3 @@ func TestConfiguredJarList(t *testing.T) {
assertStringEquals(t, "apex1:jarA", list5.String())
})
}
-
-func (p partialCompileFlags) updateEnabled(value bool) partialCompileFlags {
- p.enabled = value
- return p
-}
-
-func (p partialCompileFlags) updateUseD8(value bool) partialCompileFlags {
- p.use_d8 = value
- return p
-}
-
-func TestPartialCompile(t *testing.T) {
- mockConfig := func(value string) *config {
- c := &config{
- env: map[string]string{
- "SOONG_PARTIAL_COMPILE": value,
- },
- }
- return c
- }
- tests := []struct {
- value string
- isEngBuild bool
- expected partialCompileFlags
- }{
- {"", true, defaultPartialCompileFlags},
- {"false", true, partialCompileFlags{}},
- {"true", true, defaultPartialCompileFlags.updateEnabled(true)},
- {"true", false, partialCompileFlags{}},
- {"true,use_d8", true, defaultPartialCompileFlags.updateEnabled(true).updateUseD8(true)},
- {"true,-use_d8", true, defaultPartialCompileFlags.updateEnabled(true).updateUseD8(false)},
- {"use_d8,false", true, partialCompileFlags{}},
- {"false,+use_d8", true, partialCompileFlags{}.updateUseD8(true)},
- }
-
- for _, test := range tests {
- t.Run(test.value, func(t *testing.T) {
- config := mockConfig(test.value)
- flags, _ := config.parsePartialCompileFlags(test.isEngBuild)
- if flags != test.expected {
- t.Errorf("expected %v found %v", test.expected, flags)
- }
- })
- }
-}