@@ -31,7 +31,6 @@ import (
31
31
"github.com/bazelbuild/bazel-gazelle/rule"
32
32
"github.com/bazelbuild/bazel-gazelle/testtools"
33
33
"github.com/bazelbuild/bazel-gazelle/walk"
34
- "github.com/bazelbuild/rules_go/go/tools/bazel"
35
34
36
35
bzl "github.com/bazelbuild/buildtools/build"
37
36
)
@@ -361,40 +360,3 @@ func testConfig(t *testing.T, repoRoot string) (*config.Config, language.Languag
361
360
cexts = append (cexts , lang )
362
361
return c , lang , cexts
363
362
}
364
-
365
- // TestFullGeneration runs the gazelle binary on a few example
366
- // workspaces and confirms that the generated BUILD files match expectation.
367
- func TestFullGeneration (t * testing.T ) {
368
- tests := map [string ][]bazel.RunfileEntry {}
369
- runfiles , err := bazel .ListRunfiles ()
370
- if err != nil {
371
- t .Fatalf ("bazel.ListRunfiles() error: %v" , err )
372
- }
373
- testDataDirectory := "testdata_full_gen_test"
374
- testDataPath := filepath .Join ("language" , "proto" , testDataDirectory , "" )
375
- for _ , f := range runfiles {
376
- if strings .HasPrefix (f .ShortPath , testDataPath ) {
377
- relativePath := strings .TrimPrefix (f .ShortPath , testDataPath )
378
- parts := strings .SplitN (relativePath , "/" , 3 )
379
- if len (parts ) < 3 {
380
- // This file is not a part of a testcase since it must be in a dir that
381
- // is the test case and then have a path inside of that.
382
- continue
383
- }
384
-
385
- tests [parts [1 ]] = append (tests [parts [1 ]], f )
386
- }
387
- }
388
- if len (tests ) == 0 {
389
- t .Fatal ("no tests found" )
390
- }
391
-
392
- testArgs := testtools .NewTestGazelleGenerationArgs ()
393
- for testName , files := range tests {
394
- testArgs .Name = testName
395
- testArgs .TestDataPath = testDataPath
396
- testArgs .GazelleBinaryDir = ""
397
- testArgs .GazelleBinaryName = "gazelle_local"
398
- testtools .TestGazelleGenerationOnPath (t , testArgs , files )
399
- }
400
- }
0 commit comments