aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-05-21 12:35:51 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-05-21 12:35:51 +0200
commit712bfcbdd8558eb5d07d924ab53d1ac564ebcfd4 (patch)
treef2a2aa71d5cb8420bb9b8beaec2b8d2afbf3359a /pkg
parent4adc00e894b5b48191bc248286bee600e712f99f (diff)
pkg/runtest: test host.Setup
This would catch binfmt_misc breakage on non-linux.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/host/host.go2
-rw-r--r--pkg/runtest/run_test.go7
2 files changed, 8 insertions, 1 deletions
diff --git a/pkg/host/host.go b/pkg/host/host.go
index 972656ad7..a89a90e42 100644
--- a/pkg/host/host.go
+++ b/pkg/host/host.go
@@ -111,7 +111,7 @@ func Check(target *prog.Target) (*Features, error) {
// Setup enables and does any one-time setup for the requested features on the host.
// Note: this can be called multiple times and must be idempotent.
func Setup(target *prog.Target, features *Features, featureFlags csource.Features, executor string) error {
- if target.OS == "akaros" || target.OS == "test" {
+ if target.OS == "akaros" {
return nil
}
args := []string{"setup"}
diff --git a/pkg/runtest/run_test.go b/pkg/runtest/run_test.go
index 5cbf2b831..4fafbde65 100644
--- a/pkg/runtest/run_test.go
+++ b/pkg/runtest/run_test.go
@@ -56,6 +56,13 @@ func test(t *testing.T, sysTarget *targets.Target) {
"": calls,
"none": calls,
}
+ featureFlags, err := csource.ParseFeaturesFlags("none", "none", true)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err := host.Setup(target, features, featureFlags, executor); err != nil {
+ t.Fatal(err)
+ }
requests := make(chan *RunRequest, 2*runtime.GOMAXPROCS(0))
go func() {
for req := range requests {