Ocyss/srs-auth / .agents/skills/srs-develop
srs-develop
VerifiedDevelop, modify, debug, review, maintain, and explain the SRS and Oryx codebases and the SRS Docker image toolchain. Use for planned changes to the next-generation SRS Go proxy, SRS browser player, ossrs/dev-docker images, or Oryx Go backend, React dashboard, integrated runtime, packaging, installers, releases, and tests; bug maintenance; issue and pull-request triage; pull-request review; and Learn Code questions. The C++ SRS server is in maintenance mode, and planned Go origin and edge development is not yet supported. NOT for end-user support, usage questions, or configuration help — use srs-support for those.
scripts/proxy-utest.sh
View on GitHub#!/bin/bash
# Run unit tests for the proxy server (cmd/ and internal/ packages).
set -e
usage() {
cat <<'EOF'
Run unit tests for the proxy server (cmd/ and internal/ packages).
Usage:
proxy-utest.sh # run tests
proxy-utest.sh --coverage # run tests and print per-function coverage
proxy-utest.sh -c # short form of --coverage
EOF
}
COVERAGE=0
for arg in "$@"; do
case "$arg" in
-c|--coverage) COVERAGE=1 ;;
-h|--help) usage; exit 0 ;;
*)
echo "Error: unknown argument: $arg" >&2
usage >&2
exit 2
;;
esac
done
SCRIPT_DIR="$(cd -P "$(dirname "$0")" && pwd)"
# Walk up from SCRIPT_DIR looking for go.mod. This avoids brittle "../../../.."
# counting when the skills directory is reached via a symlink (which changes
# the symbolic vs. physical depth).
WORKSPACE="$SCRIPT_DIR"
while [[ "$WORKSPACE" != "/" && ! -f "$WORKSPACE/go.mod" ]]; do
WORKSPACE="$(dirname "$WORKSPACE")"
done
if [[ ! -f "$WORKSPACE/go.mod" ]]; then
echo "Error: go.mod not found walking up from: $SCRIPT_DIR" >&2
exit 1
fi
cd "$WORKSPACE"
PACKAGES=(./cmd/... ./internal/...)
if [[ $COVERAGE -eq 1 ]]; then
COVER_FILE="$(mktemp -t proxy-utest-coverage.XXXXXX.out)"
trap 'rm -f "$COVER_FILE"' EXIT
echo "Running proxy unit tests with coverage in: $WORKSPACE"
go test "${PACKAGES[@]}" -v -coverprofile="$COVER_FILE" -coverpkg=./cmd/...,./internal/...
echo
echo "=== Coverage (per function) ==="
go tool cover -func="$COVER_FILE"
else
echo "Running proxy unit tests in: $WORKSPACE"
go test "${PACKAGES[@]}" -v
fi
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |