dashboard: create buildlet client package, move coordinator code into it
Operation Packification, step 2 of tons.
Eventually the buildlet client binary will use this stuff now.
Change-Id: I4cf5f3e6beb9e56bdc795ed513ce6daaf61425e3
Reviewed-on: https://go-review.googlesource.com/2921
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/builders_test.go b/builders_test.go
new file mode 100644
index 0000000..96effe5
--- /dev/null
+++ b/builders_test.go
@@ -0,0 +1,22 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package dashboard
+
+import (
+ "strings"
+ "testing"
+)
+
+func TestOSARCHAccessors(t *testing.T) {
+ valid := func(s string) bool { return s != "" && !strings.Contains(s, "-") }
+ for _, conf := range Builders {
+ os := conf.GOOS()
+ arch := conf.GOARCH()
+ osArch := os + "-" + arch
+ if !valid(os) || !valid(arch) || !(conf.Name == osArch || strings.HasPrefix(conf.Name, osArch+"-")) {
+ t.Errorf("OS+ARCH(%q) = %q, %q; invalid", conf.Name, os, arch)
+ }
+ }
+}