You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 777e053
Browse filesBrowse the repository at this point in the historyBrowse files
Add `colcon ltest` (alias `lt`): colcon test with the live per-package
board, a readable summary built from JUnit (tests/failures/errors/skipped,
failing test cases with messages, JUnit locations), a non-zero exit on any
failure, an isolated ROS_DOMAIN_ID per run (on by default), and options
--no-isolated-domain, --no-user-site, --fail-on-skip PATTERN,
--retest-failed.
Add CI mode to lbuild and ltest: used when stdout is not a TTY, with --ci,
or when CI/GITHUB_ACTIONS is set. It prints a stable per-package log, GitHub
Actions groups and ::error annotations, and writes a Markdown summary to
$GITHUB_STEP_SUMMARY. Terminal output of lbuild/lclean is unchanged.
Unregistered CI handlers fall back to the live board, so a shadowing
installation can no longer make --event-handlers fail with a KeyError.
Add pytest tests under test/ and run them in CI. Bump to 0.2.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only removes directories that actually exist; nothing else is touched (no per-package
113
121
granularity, no build "profiles" the way `catkin_tools` has).
114
122
123
+
### `colcon ltest` / `colcon lt`
124
+
125
+
`colcon lt` (long form `colcon ltest`) accepts every argument `colcon test` does, including
126
+
`--packages-select`, `--packages-up-to`, `--retest-until-pass` and `--abort-on-error`.
127
+
128
+
```bash
129
+
colcon lt --packages-select my_pkg # live board, then a summary
130
+
colcon lt --retest-failed # only the packages that failed last time
131
+
colcon lt --fail-on-skip 'requires hardware'# a skip whose reason matches counts as a failure
132
+
colcon lt --no-isolated-domain --no-user-site # keep the caller's ROS environment as is
133
+
```
134
+
135
+
| Option | Default | What it does |
136
+
|---|---|---|
137
+
| exit code | non-zero on any failure | A failing test case makes the run fail even if `colcon test` itself returned 0 (the same as `colcon test --return-code-on-test-failure`, but always on). |
138
+
|`--isolated-domain` / `--no-isolated-domain`|**on**| Picks a random `ROS_DOMAIN_ID` whose DDS ports are free on this host, and sets `ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST`. See below for why. |
139
+
|`--no-user-site`| off | Sets `PYTHONNOUSERSITE=1` for the test processes, so packages in `~/.local` cannot shadow the workspace. colcon itself is not affected. |
140
+
|`--fail-on-skip PATTERN`| none | Regular expression matched against each skipped test case's skip reason. A match is counted as a failure (repeatable). |
141
+
|`--retest-failed`| off | Only tests the packages that failed in the last `ltest` run, recorded in `build/.ltest-last-failed.json`. Combined with `--packages-select` it narrows further. Packages that were not run keep their recorded state. |
142
+
|`--ci`| off | Forces CI mode (see below). |
143
+
144
+
After the run, a summary is printed:
145
+
146
+
```
147
+
Test time summary (wall time 6.13s, ROS_DOMAIN_ID=217, ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST)
0 commit comments