enhance the fleettest tool#964
Merged
Merged
Conversation
Each run now builds in its own randomly-named dir on every target (<builddir>-<run_id>), so two or three fleettest runs can share the same fleet without colliding on the pushed tree, the build, or the testtmp scratch. Port collisions were already handled by claim_ports() locks. The run dir is removed when the run ends -- on success, failure, or Ctrl-C/kill (atexit + SIGINT/SIGTERM handlers); --keep retains it. A new --cleanup mode sweeps stray <builddir>-* dirs left by a SIGKILL. Incremental builds are dropped (every run is a fresh dir + full build): --no-push removed, --clean removed. Also look for the fleet config at ~/.fleettest.json first, then testsuite/fleettest.json (still overridable with --fleet PATH).
Address review findings on the cleanup paths: - --cleanup no longer removes a bare <builddir>, only the suffixed <builddir>-* run dirs it created. This keeps the sweep within its documented scope and avoids clobbering an unrelated tree. - Add _unsafe_builddir(): reject empty/root/$HOME and any absolute path directly under / (e.g. a misconfigured builddir of "/tmp") before building a destructive command, in both cleanup paths. - Use `rm -rf --` so a path with a leading dash can't be read as options. - Soften the docs: run-dir removal on Ctrl-C/kill is best-effort (a signal arriving mid-push can still leave a remnant for --cleanup).
Records wall-clock per phase (push, build, each test transport, nonroot) plus a total in TargetResult, and with --timing prints a breakdown after the report, sorted slowest-target-first. Targets run in parallel, so the run is gated by the slowest one; the phase columns show whether that hold-up is the push, the build, or a test pass. A target that failed early (no total) falls back to the sum of the phases it reached.
fleettest is a developer tool meant to run on a modern Ubuntu box, so a bitrot check belongs in its own ubuntu-latest job rather than in the testsuite (which runs on the BSD/Solaris/macOS/Cygwin matrix, whose older Pythons may not even parse it). The job sets up passwordless ssh to localhost, writes a two-target fleet config that both ssh to localhost (distinct build dirs), and runs a real fleettest pass. Two targets exercise the parallel multi-target path and the per-run dir / port isolation; the run exits 0 only if every cell is OK. Triggered on changes to fleettest.py or this workflow, manually, and weekly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note that fleettest is a developer only tool, it's meant to save me CI time by running on a set of local VMs and machines