Pw kernel testing

From pigweed-project/pigweed · View interactive version

Pw kernel testing is an AI agent skill from the GitHub repository pigweed-project/pigweed. Instructions for running tests and lints for the Pigweed kernel (`pw_kernel`).

How to use this skill

Skill file

Pigweed Kernel Testing

This skill provides instructions for running tests and lints for the Pigweed kernel (pw_kernel).

Building and Testing

Common Configurations

Configurations are defined in //workflows.json under the kernel group (via kernel_host and kernel_device subgroups). Common ones include:

Running Tests

To run tests for a specific configuration:

bazelisk test --config=k_host //pw_kernel/...

To run a specific test:

bazelisk test --config=k_host //pw_kernel/kernel/tests:scheduler_test

[!NOTE]

Use --noshow_progress --noshow_loading_progress to reduce output in agent contexts if needed.

[!TIP]

Use --test_timeout=10 --test_output=all to catch tests which do not terminate.

Linting and Formatting

Rust Linting

The kernel build steps named like k_*_lint should be run to provide Rust linting for the code. These are defined in workflows.json.

Example for linting on host:

bazelisk build --config=k_lint --config=k_host //pw_kernel/...

Project-wide Formatting and Presubmit

Run these from the repository root:

When to use this skill

Use this skill when you need to run tests, lints, or verify changes in the pw_kernel module. This ensures you use the correct configurations and tools as defined by the project.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.