[graphics][compute]: GN rules for unit-tests

This CL introduces our first GoogleTest-based unit-test suite
(name src/graphics/lib/compute:compute_graphics_unittests).

For now, this is limited to common/util_unittest.cpp, a pretty
basic unit-test for the declarations in common/util.h, which
fortunately do not rely on a Vulkan test environment.

+ Introduce gn/testing.gni which provides
  graphics_compute_unittests() and graphics_compute_unittest_package()
  templates which can be used to define GN targets for unit-test
  suites and the embedding executable / Fuchsia package for them,
  respectively.

  To run the test on the host, simply build it and launch it
  as in:

    fx build src/graphics/lib/compute:tests
    out/default/host_x64/graphics_compute_unittests

  To run the test on a device, please ensure that the test package
  target is listed in your args.gn with something like:

    universe_package_labels += [
      "//src/graphics/lib/compute:graphics_compute_unittests",
    ]

  Then launch with:

    fx run-test graphics_compute_unittests

Future CLs will add a small Vulkan test environment, and appropriate
GN rules to write Vulkan-based unit-tests as well (in order to test
the content of common/vk/), but this is a much harder problem :-)

BUG: SPN-46
TEST: fx run-test graphics_compute_unittests

Change-Id: I4b259386c5d65d711e79c2d5cc45a840c8fdb2ff
8 files changed
tree: cc0695553ec6ff03b1a40619e8bf78e7367d4c31
  1. boards/
  2. build/
  3. buildtools/
  4. bundles/
  5. docs/
  6. examples/
  7. garnet/
  8. peridot/
  9. products/
  10. scripts/
  11. sdk/
  12. src/
  13. third_party/
  14. tools/
  15. zircon/
  16. .clang-format
  17. .clang-tidy
  18. .dir-locals.el
  19. .gitattributes
  20. .gitignore
  21. .gn
  22. AUTHORS
  23. BUILD.gn
  24. CODE_OF_CONDUCT.md
  25. CONTRIBUTING.md
  26. LICENSE
  27. OWNERS
  28. PATENTS
  29. README.md
  30. rustfmt.toml
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See the documentation.