tree: 6a5d993f628812d9eb2bcea4349d1a8f654f0f63 [path history] [tgz]
  1. BUILD.gn
  2. README.md
  3. meta/
  4. src/
  5. test_data/
  6. tests/
src/sys/test_runners/gtest/README.md

GTest Runner

Reviewed on: 2020-04-20

GTest Runner is a test runner that launches a gtest binary as a component, parses its output, and translates it to fuchsia.test.Suite protocol on behalf of the test.

Building

fx set core.x64 --with //src/sys/test_runners/gtest
fx build

Examples

Examples to demonstrate how to write v2 test

To run this example:

fx run-test gtest-runner-example-tests

Limitations

Currently gtest runner doesn't support:

  • Disabled tests.
  • Tests writing to stdout, those tests can be executed but stdout is lost.

Testing

Run:

fx run-test gtest_runner_tests

Source layout

The entrypoint is located in src/main.rs, the FIDL service implementation and all the test logic exists in src/test_server.rs. Unit tests are co-located with the implementation.