Skip to content

Commit

Permalink
[release-branch.go1.14] internal/execabs: only run tests on platforms…
Browse files Browse the repository at this point in the history
… that support them

Fixes #43792

Change-Id: I3bf022a28b194f0089ea96d93e56bbd9fb7e0aa8
Reviewed-on: https://go-review.googlesource.com/c/go/+/285055
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
  • Loading branch information
rolandshoemaker authored and dmitshur committed Jan 21, 2021
1 parent 123e378 commit b57ea3d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/internal/execabs/execabs_test.go
Expand Up @@ -7,6 +7,7 @@ package execabs
import (
"context"
"fmt"
"internal/testenv"
"io/ioutil"
"os"
"os/exec"
Expand All @@ -30,6 +31,8 @@ func TestFixCmd(t *testing.T) {
}

func TestCommand(t *testing.T) {
testenv.MustHaveExec(t)

for _, cmd := range []func(string) *Cmd{
func(s string) *Cmd { return Command(s) },
func(s string) *Cmd { return CommandContext(context.Background(), s) },
Expand Down Expand Up @@ -71,6 +74,8 @@ func TestCommand(t *testing.T) {
}

func TestLookPath(t *testing.T) {
testenv.MustHaveExec(t)

tmpDir, err := ioutil.TempDir("", "execabs-test")
if err != nil {
t.Fatalf("ioutil.TempDir failed: %s", err)
Expand Down

0 comments on commit b57ea3d

Please sign in to comment.