From eb280c9300379af95f80d59ca78f3e77be9051dc Mon Sep 17 00:00:00 2001 From: Andrew Allen Date: Tue, 9 Jun 2020 20:24:28 +0000 Subject: [PATCH] One more try for windows --- gazelle/gazelle_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gazelle/gazelle_test.go b/gazelle/gazelle_test.go index 73d5ee33..0cf8e8aa 100644 --- a/gazelle/gazelle_test.go +++ b/gazelle/gazelle_test.go @@ -33,11 +33,11 @@ var gazellePath = findGazelle() // directory in `testdata/*`. Please see `testdata/README.md` for more // information on each test. func TestGazelleBinary(t *testing.T) { - runfilesPath, err := bazel.RunfilesPath() + readmePath, err := bazel.Runfile("gazelle/testdata/README.md") if err != nil { t.Fatalf("bazel.RunfilesPath() error: %v", err) } - testdata := filepath.Join(runfilesPath, "gazelle", "testdata") + testdata := filepath.Dir(readmePath) ds, err := ioutil.ReadDir(testdata) if err != nil { t.Fatalf("ioutil.ReadDir(%q) error: %v", testdata, err) @@ -72,6 +72,7 @@ func testPath(testdata string, dir string) func(t *testing.T) { // Now trim the common prefix off. newPath := strings.TrimPrefix(path, filepath.Join(testdata, dir)+"/") + t.Logf("newPath %q, path %q, testdata %q, dir %q", newPath, path, testdata, dir) if strings.HasSuffix(newPath, ".in") { inputs = append(inputs, testtools.FileSpec{