tree: b82dac74964462e52e8666757eff3ec4e6bbfbd9 [path history] [tgz]
  1. buildbot/
  2. external/
  3. meta/
  4. sdk/
  5. .bazelrc
  6. BUILD.bazel
  7. BUILD.src
  8. README.md
  9. utils.bzl
  10. WORKSPACE.bazel
scripts/fuchsia/README.md

Testing the CTS on Fuchsia

The default SDK for developing applications of Fuchsia has build rules written in Bazel. To take advantage of that, we have a wrapper Bazel build that invokes cmake using rules_foreign_cc.

The upstream rules_foreign_cc deletes the temporary build directory (containing all the CMake output) after every build, which turns incremental rebuilds into full builds and makes them take just as long. This repo has a patch to rules_foreign_cc to prevent deletion so all the old object files can be reused.

The main bazel repository is in scripts/fuchsia, not at the root of the git repo. The root of the git repo is then included as an external repository under the path external/src. This prevents a conflict between the external directory bazel uses to hold external repositories and the external directory this project uses to hold external dependencies (which then appears under external/src/external).

Running tests on Fuchsia Emulator

All bazel commands must be run under scripts/fuchsia.

Detailed instructions for downloading and starting the fuchsia emulator are at fuchsia.dev.

Some differences:

  1. You must install bazel manually.
  2. ffx will be under bazel-fuchsia/external/fuchsia_sdk/tools/x64/ffx instead of tools/ffx.

Once you've downloaded and started the fuchsia emulator, use this command to run all the tests:

bazel run --config=fuchsia_x64 //:vulkan-cts-split

To run a single test, use the command (notice the two --s):

bazel run --config=fuchsia_x64 //:vulkan-cts.component -- -- --deqp-archive-dir=/pkg/data --deqp-log-filename=/artifacts/TestResults.qpa --deqp-case=<casename>

Running tests with an existing Fuchsia tree build

Install the tests into the fuchsia build using:

bazel build --config=fuchsia_x64 --package_repo=$FUCHSIA_OUT_DIR/amber-files //:vulkan-cts-split_fuchsia_package

Run using:

ffx test run fuchsia-pkg://fuchsia.com/vulkan-cts-split#meta/vulkan-cts-split-${SPLIT_INDEX}.cm