The tests for all languages may be run from the command line:
Windows Note: On Windows,
makeis not available by default. While not required, installing
makewill allow you to use the convenience features in the
The Rust tests may be run with the following command:
cargo test --all
Log output can be controlled via the environment variable
RUST_LOG for the
When running tests with logging you need to tell
cargo to not suppress output:
cargo test -- --nocapture
Tests run in parallel by default, leading to interleaving log lines. This makes it harder to understand what's going on. For debugging you can force single-threaded tests:
cargo test -- --nocapture --test-threads=1
The full Android test suite may be run from the command line with:
To run the full Android test suite, in the "Gradle" pane, navigate to
verification and double-click either
testReleaseUnitTest (depending on whether you want to run in Debug or Release mode).
You can save this task permanently by opening the task dropdown in the toolbar and selecting
"Save glean.rs:glean:android [testDebugUnitTest] Configuration".
To run a single Android test, navigate to the file containing the test, and right click on the green arrow in the left margin next to the test. There you have a choice of running or debugging the test.
The full iOS test suite may be run from the command line with:
To run the full iOS test suite, run tests in Xcode (
Product -> Test).
To run a single Swift test, navigate to the file containing the test,
and click on the arrow in the left margin next to the test.
We run multiple tests on CI for every Pull Request and every commit to the
- Full Android tests
- Full iOS tests
- Rust tests
- Rust, Kotlin and Swift source code formatting
- Rust, Kotlin and Swift source code linting
- Generating documentation from Rust, Kotlin, Swift and the book
- Checking link validity of documentation
- Deploying generated documentation
These checks are required to pass before a Pull Request is merged.
Documentation is deployed from CI, we therefore need it to run on documentation changes. However, some of the long-running code tests can be skipped. For that add the following literal string to the last commit message to be pushed:
It is possible to completely skip running CI on a given push by including the following literal string in the commit message:
This should only be used for metadata files, such as those in