Add current build release

Previously, the build releases only included named releases so did not
have a way to represent the latest build release. This adds the current
build release (named after the current API level) to represent that.

Bug: 240406019
Test: m nothing
Change-Id: Ib8336da716b447448b23bc9684ce3be1ab78648a
(cherry picked from commit 42a49f1278)
Merged-In: Ib8336da716b447448b23bc9684ce3be1ab78648a
This commit is contained in:
Paul Duffin
2022-08-17 22:09:55 +00:00
committed by Cherrypicker Worker
parent b5e3c9802a
commit 4eed981670
4 changed files with 46 additions and 20 deletions

View File

@@ -42,7 +42,7 @@ func TestNameToRelease(t *testing.T) {
android.AssertDeepEquals(t, "release", (*buildRelease)(nil), release)
// Uses a wildcard in the error message to allow for additional build releases to be added to
// the supported set without breaking this test.
android.FailIfNoMatchingErrors(t, `unknown release "A", expected one of \[S,T.*,F1,F2\]`, []error{err})
android.FailIfNoMatchingErrors(t, `unknown release "A", expected one of \[S,Tiramisu,F1,F2,current\]`, []error{err})
})
}
@@ -55,7 +55,7 @@ func TestParseBuildReleaseSet(t *testing.T) {
t.Run("open range", func(t *testing.T) {
set, err := parseBuildReleaseSet("F1+")
android.AssertDeepEquals(t, "errors", nil, err)
android.AssertStringEquals(t, "set", "[F1,F2]", set.String())
android.AssertStringEquals(t, "set", "[F1,F2,current]", set.String())
})
t.Run("closed range", func(t *testing.T) {
set, err := parseBuildReleaseSet("S-F1")