Files
pkgmgr/scripts/test/container/unittest.sh
T
Kevin Veen-BirkenbachandClaude Opus 5.5 4cb00eec18 chore(test): fold the container scripts to clear the quality findings
quality clean.prefix-groups: env-nix.sh and env-virtual.sh move to scripts/test/container/env/nix.sh and env/virtual.sh; their only callers, scripts/test/test-env-nix.sh and test-env-virtual.sh, are updated. clean.clones: the shared git safe.directory block of e2e.sh and env-nix.sh is one script, scripts/test/container/safe-directory.sh, called at the same spot. clean.comment: parameter lines use the form # Param: NAME ($n) - text. coding.shell-lint SC1091: quality runs shellcheck without -x, so the source directives are shellcheck source=/dev/null like the sibling scripts; the sourcing logic is unchanged.

| 🌿 Branch | 📊 Diff stat | 🎯 Fix | 💥 Break | 💸 Tokens | ⏱️ Velocity | 🛡️ Security | 🏆 Score | Gate |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| chore/test-scripts-no-inline | 7 files +17/-17 | 92 % | 3 % | – | – | 100 % | 89 | ✅ 90/5, tokens and velocity <= 100, security 100 % |

Evidence: quality check --staged 0 findings, shellcheck --norc clean on all 7 scripts, MEDUSA 100 %, critical 0. The container jobs of PR CI are the proof. Hub review 42b3a76554491026.

Refs https://github.com/kevinveenbirkenbach/package-manager/pull/20

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 22:57:43 +00:00

13 lines
336 B
Bash
Executable File

#!/usr/bin/env bash
set -e
# Param: suite ($1) - the test folder to discover, tests/unit or tests/integration.
suite="$1"
git config --global --add safe.directory /opt/src/pkgmgr || true
nix develop .#default --no-write-lock-file -c \
python3 -m unittest discover \
-s "$suite" \
-t /opt/src/pkgmgr \
-p "$TEST_PATTERN"