Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

Commit

Permalink
schema: add ppc64l/ppc64b as valid linux archs
Browse files Browse the repository at this point in the history
This adds labeling for the two endian variants of ppc64:
`ppc64l` for little-endian and `ppc64b` for big-endian.

These explicitly do *NOT* correspond to `uname -m` or
$GOARCH on Linux systems, but try to stay
consistent with existing arm7 endian-aware labels.
  • Loading branch information
lucab committed Jul 13, 2016
1 parent 7502e45 commit 7b4b40b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion schema/types/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
)

var ValidOSArch = map[string][]string{
"linux": {"amd64", "i386", "aarch64", "aarch64_be", "armv6l", "armv7l", "armv7b"},
"linux": {"amd64", "i386", "aarch64", "aarch64_be", "armv6l", "armv7l", "armv7b", "ppc64l", "ppc64b"},
"freebsd": {"amd64", "i386", "arm"},
"darwin": {"x86_64", "i386"},
}
Expand Down
20 changes: 20 additions & 0 deletions schema/types/labels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,26 @@ func TestLabels(t *testing.T) {
`[{"name": "os", "value": "linux"}, {"name": "arch", "value": "armv7b"}]`,
"",
},
{
`[{"name": "os", "value": "linux"}, {"name": "arch", "value": "ppc64l"}]`,
"",
},
{
`[{"name": "os", "value": "linux"}, {"name": "arch", "value": "ppc64le"}]`,
`bad arch "ppc64le" for linux`,
},
{
`[{"name": "os", "value": "linux"}, {"name": "arch", "value": "ppc64"}]`,
`bad arch "ppc64" for linux`,
},
{
`[{"name": "os", "value": "linux"}, {"name": "arch", "value": "ppc64b"}]`,
"",
},
{
`[{"name": "os", "value": "linux"}, {"name": "arch", "value": "ppc64be"}]`,
`bad arch "ppc64be" for linux`,
},
{
`[{"name": "os", "value": "freebsd"}, {"name": "arch", "value": "amd64"}]`,
"",
Expand Down

0 comments on commit 7b4b40b

Please sign in to comment.