Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Gazelle extension to //gazelle/bzl and change package name #261

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix runfiles access in test
  • Loading branch information
Jay Conrod committed Aug 5, 2020
commit e722c34394ec70cb7bc3130bd6df883673571024
7 changes: 5 additions & 2 deletions gazelle/bzl/gazelle_test.go
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ import (

var gazellePath = findGazelle()

const testDataPath = "gazelle/testdata/"
const testDataPath = "gazelle/bzl/testdata/"

// TestGazelleBinary runs a gazelle binary with starlib installed on each
// directory in `testdata/*`. Please see `testdata/README.md` for more
@@ -54,6 +54,9 @@ func TestGazelleBinary(t *testing.T) {
tests[parts[0]] = append(tests[parts[0]], f)
}
}
if len(tests) == 0 {
t.Fatal("no tests found")
}

for testName, files := range tests {
testPath(t, testName, files)
@@ -132,7 +135,7 @@ func testPath(t *testing.T, name string, files []bazel.RunfileEntry) {
}

func findGazelle() string {
gazellePath, ok := bazel.FindBinary("gazelle", "gazelle-skylib")
gazellePath, ok := bazel.FindBinary("gazelle/bzl", "gazelle-skylib")
if !ok {
panic("could not find gazelle binary")
}