mirror of
https://fastgit.cc/github.com/HKUDS/CLI-Anything
synced 2026-04-30 13:52:20 +08:00
1.9 KiB
1.9 KiB
description
| description |
|---|
| Run tests for a CLI harness and update TEST.md with results |
cli-anything-test Command
Run tests for a CLI harness and update TEST.md with results.
Target software: $1
CRITICAL: Read HARNESS.md First
Before running tests, read ./HARNESS.md (located alongside this command). It defines the test standards, expected structure, and what constitutes a passing test suite.
Arguments
-
$1is the software path or repo URL (required). Either:- A local path to the software source code (e.g.,
/home/user/gimp,./blender) - A GitHub repository URL (e.g.,
https://github.com/GNOME/gimp,github.com/blender/blender)
If a GitHub URL is provided, clone the repo locally first, then work on the local copy.
The software name is derived from the directory name. The agent locates the CLI harness at
/root/cli-anything/<software-name>/agent-harness/. - A local path to the software source code (e.g.,
What This Command Does
- Locates the CLI - Finds the CLI harness based on the software path
- Runs pytest - Executes tests with
-v -s --tb=short - Captures output - Saves full test results
- Verifies subprocess backend - Confirms
[_resolve_cli] Using installed command:appears in output - Updates TEST.md - Appends results to the Test Results section
- Reports status - Shows pass/fail summary
Test Output Format
The command appends to TEST.md:
## Test Results
Last run: 2024-03-05 14:30:00
[full pytest -v --tb=no output]
**Summary**: 103 passed in 3.05s
Success Criteria
- All tests pass (100% pass rate)
- TEST.md is updated with full results
- No test failures or errors
[_resolve_cli]output confirms installed command path
Failure Handling
If tests fail:
- Shows which tests failed
- Does NOT update TEST.md (keeps previous passing results)
- Suggests fixes based on error messages
- Offers to re-run after fixes