Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,13 @@ merged:
## Binary artifacts

Checking in binary artifacts is not allowed. This is because they are extremely
problematic to verify and ensure they're safe
problematic to verify and ensure they're safe. This is true even in
test contexts.

Examples include, but aren't limited to: prebuilt binaries, shared libraries,
zip files, or wheels.

See the dev guide for utilities to help with testing.

(breaking-changes)=
## Breaking Changes
Expand Down
12 changes: 12 additions & 0 deletions docs/devguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ to be perfectly factored and not every common thing a test does needs to be
factored into a more generally reusable piece. Copying and pasting is fine. It's
more important for tests to balance understandability and maintainability.

### Test utilities

General code to support testing is in {gh-path}`tests/support`. It has a variety
of functions, constants, rules etc, to make testing easier. Below are some
common utilities that are frequently used.

### sh_py_run_test

The {gh-path}`sh_py_run_test <tests/support/sh_py_run_test.bzl` rule is a helper to
Expand Down Expand Up @@ -68,6 +74,12 @@ the rule. To have it support setting a new flag:
list, then modify the transition's logic to check the attribute and set
the flag value if the attribute is set.

### whl_from_dir_repo

The `whl_from_dir_repo` repository rule in {gh-path}`tests/support/whl_from_dir`
takes a directory tree and turns it into a `.whl` file. This can be used to
create arbitrary whl files to verify functionality.

### Integration tests

An integration test is one that runs a separate Bazel instance inside the test.
Expand Down