tree: a8aa634232e70951a96c8edc3a004f34d24fc0d3
  1. BUILD.bazel
  2. main.cc
  3. native_sim_cc_unit_test.bzl
  4. prj.conf
  5. README.md
  6. runner.sh
pw_tests/pw_smoke_tests/README.md

Zephyr-Pigweed Smoke Tests

This directory contains smoke tests for verifying Pigweed modules running on the Zephyr RTOS, running them on the native_sim platform.

All the tests are defined in Pigweed. They are just run in the zephyr-bazel context

Why not build/run in Pigweed?

At present, zephyr-bazel is being actively developed, and things like how the kconfig system is configured are changing.

All the setup here will be moved over to Pigweed when things are more stable.

If it were moved too early, then any change to how the Zephyr configuration is done in the MODULE.bazel would have to be landed here, and separately landed in Pigweed. It could be done, it would just cause rollers to break until everything was consistent again.

Running tests

To run the tests on the native_sim platform, you can use the Pigweed workflow runner script in the tests subdirectory (above this one).

$ cd zephyr-bazel/pw_tests
$ ./pw default

Alternatively, you can run the Bazel test suite directly:

$ cd zephyr-bazel/pw_tests
$ bazel test //smoke_tests

Or if you know the target name for a specific test, you can run it directly:

$ bazel test //smoke_tests:pw_allocator_zephyr_test

Listing tests

The list of tests in the suite is a bit opaque as it does come from Pigweed.

You can list the individual tests contained in the smoke_tests suite with a bazel query.

$ bazel query "tests(//smoke_tests:smoke_tests)"
//smoke_tests:pw_allocator_zephyr_test
...

Configuring the tests in Pigweed

In the Pigweed source tree, the tests to run here in zephyr-bazel are defined in the zephyr/pw_smoke_tests.bzl source code file.

You update the test configuration there.