sweet: disable get subcommand on plan9
Repo x/benchmarks tests have been failing on plan9 because the
sweet tool uses linux-dependent modules which don't build on plan9.
CL 689187 fixes the analogous problem for wasm, by making a
wasm-specific stub for the get subcommand. Here we extend the
change to apply to plan9 as well.
Fixes golang/go#74149
Change-Id: I25e232a5fbce001b74c63114577ac17d6bbf3bbe
Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/693896
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/sweet/cmd/sweet/get_nowasm.go b/sweet/cmd/sweet/get_cipd.go
similarity index 98%
rename from sweet/cmd/sweet/get_nowasm.go
rename to sweet/cmd/sweet/get_cipd.go
index 2b71aea..e72707d 100644
--- a/sweet/cmd/sweet/get_nowasm.go
+++ b/sweet/cmd/sweet/get_cipd.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !wasm
+//go:build !wasm && !plan9
package main
diff --git a/sweet/cmd/sweet/get_wasm.go b/sweet/cmd/sweet/get_nocipd.go
similarity index 72%
rename from sweet/cmd/sweet/get_wasm.go
rename to sweet/cmd/sweet/get_nocipd.go
index 6e26046..768a4eb 100644
--- a/sweet/cmd/sweet/get_wasm.go
+++ b/sweet/cmd/sweet/get_nocipd.go
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build wasm || plan9
+
package main
import (
@@ -12,5 +14,5 @@
func (c *getCmd) Run(_ []string) error {
log.SetActivityLog(true)
- return errors.New("get unsupported on wasm: CIPD not supported on wasm")
+ return errors.New("get unsupported on this platform: CIPD not supported on this platform")
}