cupsadmin: CLI, CupsKit, app in progress

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kfattic
2026-09-16 13:13:07 -05:00
commit eba94aae4e
44 changed files with 7256 additions and 0 deletions

20
test.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
# Runs CupsKit tests with Swift Testing from the Command Line Tools (no Xcode).
# The CLT ship Testing.framework outside the default search path and an empty _Testing_Foundation
# overlay, so point at the framework, disable cross-import overlays, and load the @Test macro plugin.
# Live apply tests: CUPSKIT_LIVE_QUEUE=<throwaway Ricoh queue> ./test.sh
START_EPOCH=$(date +%s)
echo "started $(date +%H:%M:%S)"
finish() {
local rc=$?
[ $rc -eq 0 ] && echo "OK: tests passed" || echo "ERROR: swift test exited $rc"
echo "finished $(date +%H:%M:%S) (total $(awk -v s="$(( $(date +%s) - START_EPOCH ))" 'BEGIN{printf "%.1f", s/60}') min)"
}
trap finish EXIT
cd "$(dirname "$0")"
F=/Library/Developer/CommandLineTools/Library/Developer/Frameworks
P=/Library/Developer/CommandLineTools/usr/lib/swift/host/plugins/testing
swift test \
-Xswiftc -F -Xswiftc "$F" -Xswiftc -Xfrontend -Xswiftc -disable-cross-import-overlays \
-Xswiftc -plugin-path -Xswiftc "$P" \
-Xlinker -F -Xlinker "$F" -Xlinker -rpath -Xlinker "$F" "$@"