]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: skip gitrepo tests on Plan 9
authorDavid du Colombier <0intro@gmail.com>
Fri, 6 Jul 2018 08:46:37 +0000 (10:46 +0200)
committerDavid du Colombier <0intro@gmail.com>
Fri, 6 Jul 2018 14:45:29 +0000 (14:45 +0000)
CL 118095 added gitrepo tests. These tests are failing on Plan 9
since they expect a full-featured git command, while the git tool
has been emulated as a simple rc script on Plan 9.

Fixes #25938.

Change-Id: I262a89d0ce83168c550d9af3e832ed3a1e3c43f6
Reviewed-on: https://go-review.googlesource.com/122455
Run-TryBot: David du Colombier <0intro@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/internal/modfetch/gitrepo/fetch_test.go

index 622249e67d645113d8e96f768a6a7e995ee79648..cc86cd9cba7eced77e8300853ce4dbf452929a22 100644 (file)
@@ -16,6 +16,7 @@ import (
        "os/exec"
        "path/filepath"
        "reflect"
+       "runtime"
        "strings"
        "testing"
        "time"
@@ -42,6 +43,12 @@ func testMain(m *testing.M) int {
                return 0
        }
 
+       if runtime.GOOS == "plan9" {
+               fmt.Fprintln(os.Stderr, "skipping on plan9")
+               fmt.Println("PASS")
+               return 0
+       }
+
        dir, err := ioutil.TempDir("", "gitrepo-test-")
        if err != nil {
                log.Fatal(err)