Skip to content
Permalink
main
Switch branches/tags
Go to file
…o is deprecated. (#327)

See bazelbuild/bazel-federation#127

In particular, this allows us to use a modern Stardoc release to fix generated md docs.

And we can remove internal_deps.bzl/internal_setup.bzl - it's unnecessary complexity
needed only for deprecated Federation setup.
3 contributors

Users who have contributed to this file

@c-parsons @tetromino @alexeagle
executable file 48 lines (33 sloc) 1.81 KB

A test verifying other targets can be successfully analyzed as part of a bazel test

analysis_test

analysis_test(name, targets)

Test rule checking that other targets can be successfully analyzed.

This rule essentially verifies that all targets under `targets` would
generate no errors when analyzed with `bazel build [targets] --nobuild`.
Action success/failure for the targets and their transitive dependencies
are not verified. An analysis test simply ensures that each target in the transitive
dependencies propagate providers appropriately and register actions for their outputs
appropriately.

NOTE: If the targets fail to analyze, instead of the analysis_test failing, the analysis_test
will fail to build. Ideally, it would instead result in a test failure. This is a current
infrastructure limitation that may be fixed in the future.

Typical usage:

  load("@bazel_skylib//rules:analysis_test.bzl", "analysis_test")
  analysis_test(
      name = "my_analysis_test",
      targets = [
          "//some/package:rule",
      ],
  )

Args:
  name: The name of the test rule.
  targets: A list of targets to ensure build.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
targets - List of labels required