xref: /aosp_15_r20/external/bazelbuild-rules_python/tests/integration/README.md (revision 60517a1edbc8ecf509223e9af94a7adec7d736b8)
1*60517a1eSAndroid Build Coastguard Worker# Bazel-in-Bazel integration tests
2*60517a1eSAndroid Build Coastguard Worker
3*60517a1eSAndroid Build Coastguard WorkerThe tests in this directory are Bazel-in-Bazel integration tests. These are
4*60517a1eSAndroid Build Coastguard Workernecessary because our CI has a limit of 80 jobs, and our test matrix uses most
5*60517a1eSAndroid Build Coastguard Workerof those for more important end-to-end tests of user-facing examples.
6*60517a1eSAndroid Build Coastguard Worker
7*60517a1eSAndroid Build Coastguard WorkerThe tests in here are more for testing internal aspects of the rules that aren't
8*60517a1eSAndroid Build Coastguard Workereasily tested as tests run by Bazel itself (basically anything that happens
9*60517a1eSAndroid Build Coastguard Workerprior to the analysis phase).
10*60517a1eSAndroid Build Coastguard Worker
11*60517a1eSAndroid Build Coastguard Worker## Adding a new directory
12*60517a1eSAndroid Build Coastguard Worker
13*60517a1eSAndroid Build Coastguard WorkerWhen adding a new diretory, a couple files need to be updated to tell the outer
14*60517a1eSAndroid Build Coastguard WorkerBazel to ignore the nested workspace.
15*60517a1eSAndroid Build Coastguard Worker
16*60517a1eSAndroid Build Coastguard Worker* Add the directory to the `--deleted_packages` flag. Run `pre-commit` and it
17*60517a1eSAndroid Build Coastguard Worker  will do this for you. This also allows the integration test to see the
18*60517a1eSAndroid Build Coastguard Worker  nested workspace files correctly.
19*60517a1eSAndroid Build Coastguard Worker* Update `.bazelignore` and add `tests/integration/<directory>/bazel-<name>`.
20*60517a1eSAndroid Build Coastguard Worker  This prevents Bazel from following infinite symlinks and freezing.
21*60517a1eSAndroid Build Coastguard Worker* Add a `rules_python_integration_test` target to the BUILD file.
22