Sort codenames in version_defaults.rbc
Without the sort, the codenames were appearing in a random order. This was causing `go test` to flake. Test: go test Change-Id: Ieeb0677503d1521dc4b1aead09ea1ab7ea38b2ea
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
package mk2rbc
|
package mk2rbc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
mkparser "android/soong/androidmk/parser"
|
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
@@ -23,6 +22,8 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
mkparser "android/soong/androidmk/parser"
|
||||||
)
|
)
|
||||||
|
|
||||||
const codenamePrefix = "PLATFORM_VERSION_CODENAME."
|
const codenamePrefix = "PLATFORM_VERSION_CODENAME."
|
||||||
@@ -97,7 +98,10 @@ func VersionDefaults(values map[string]string) string {
|
|||||||
strings.ToLower(name), genericValue(value)))
|
strings.ToLower(name), genericValue(value)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sort.Strings(lines)
|
sort.Strings(lines)
|
||||||
|
sort.Strings(codenames)
|
||||||
|
|
||||||
sink.WriteString("version_defaults = struct(\n")
|
sink.WriteString("version_defaults = struct(\n")
|
||||||
for _, l := range lines {
|
for _, l := range lines {
|
||||||
sink.WriteString(l)
|
sink.WriteString(l)
|
||||||
|
Reference in New Issue
Block a user