tree: fdffe3f3bed93c2c81cf2b8036d90dda6f38df38 [path history] [tgz]
  1. expected.gen/
  2. BUILD.bazel
  3. BUILD.gn
  4. README.md
build/bazel/tests/build_action/00_no_inputs/README.md

This test verifies the most basic functionality of bazel_action().

  • BUILD.gn contains a single GN test target definition which uses bazel_action() to build a Bazel target. It does not take any inputs, but expects a foo.out file to be generated in the Bazel output_base, and will copy it under the name foo.ninja.out to a Ninja-specific output location.

  • BUILD.bazel contains the definition of the Bazel target that generates foo.out. It does not take any inputs, and simply writes Hello Foo! to the file.

  • The expected.gen directory is used to verify that:

    • The generated Bazel output file is copied to the right location, and has the expected content (which is simply “Hello Foo!”)

    • The depfile (foo.d) for the GN target lists the BUILD.bazel file as an implicit input of the corresponding GN/Ninja target.