Skip to content

Commit

Permalink
TMP: Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Jul 31, 2024
1 parent eb19027 commit 2af6ccb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/generationtest/generation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,22 @@ func TestFullGeneration(t *testing.T) {

// Collect tests in the same repo as the gazelle binary.
repo := strings.Split(*gazelleBinaryPath, "/")[0]
_, err = r.Open(*gazelleBinaryPath)
if err != nil {
t.Fatalf("Failed to open gazelle binary %s in runfiles. Error: %v", *gazelleBinaryPath, err)
}
fs.WalkDir(r, ".", func(p string, d fs.DirEntry, err error) error {
println("p: ", p)
return nil
})
err = fs.WalkDir(r, repo, func(p string, d fs.DirEntry, err error) error {
if err != nil {
return err
}
if d.IsDir() {
return nil
}
println("p: ", p)
// Each repo boundary file marks a test case.
if d.Name() == "WORKSPACE" || d.Name() == "MODULE.bazel" || d.Name() == "REPO.bazel" {
repoRelativeDir := path.Dir(strings.TrimPrefix(p, repo+"/"))
Expand Down

0 comments on commit 2af6ccb

Please sign in to comment.