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
5 changes: 4 additions & 1 deletion .agents/rules/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ description: Bazel test execution, integration test flags, and lockfiles
## Test Organization
* **Domain Placement**: Place tests by the feature tested (e.g.,
`tests/bootstrap_impls/`), not by the fixture helper used (e.g.,
`py_extension`).
`py_extension`). Keep tests and `BUILD.bazel` targets for `.agents/` scripts
co-located with the agent code (not under `tests/`), and run them via
`bazel test --config=fast-tests //.agents/...` since `//tests/...` does not
cover `.agents/`.
* **Platform Constraints**: Restrict OS-specific targets with
`target_compatible_with` (e.g., `["@platforms//os:windows"]`) to skip on
incompatible platforms.
Expand Down
23 changes: 19 additions & 4 deletions .agents/skills/conversation-done/scripts/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
package(default_visibility = ["//tests:__subpackages__"])
load("//python:py_library.bzl", "py_library")
load("//python:py_test.bzl", "py_test")
load("//tests/support:support.bzl", "NOT_WINDOWS")

exports_files(
["cleanup.py"],
visibility = ["//tests:__subpackages__"],
package(default_visibility = ["//visibility:private"])

py_library(
name = "cleanup",
testonly = True,
srcs = ["cleanup.py"],
imports = ["."],
target_compatible_with = NOT_WINDOWS,
)

py_test(
name = "cleanup_test",
size = "small",
srcs = ["cleanup_test.py"],
target_compatible_with = NOT_WINDOWS,
deps = [":cleanup"],
)
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ bzl_library(

## Building and testing

Tests are under the `tests/` directory.
Tests are under the `tests/` directory, except tests for agent scripts under
`.agents/`, which stay co-located with the agent code (run with
`bazel test --config=fast-tests //.agents/...`).

When testing, add `--config=fast-tests`.

Expand Down
19 changes: 0 additions & 19 deletions tests/agents/BUILD.bazel

This file was deleted.

Loading