diff --git a/Makefile b/Makefile index 30e23a6b..8acdb0b9 100644 --- a/Makefile +++ b/Makefile @@ -344,13 +344,17 @@ test-app: ensure-ghostty # Run app/unit tests via xcodebuild test-cli-smoke: build-cli # Smoke test CLI executable @set -euo pipefail; \ bin="$$(swift build --show-bin-path)/prowl"; \ + tmp_root="$${TMPDIR:-/tmp}"; \ + tmp_dir="$$(mktemp -d "$${tmp_root%/}/prowl-smoke.XXXXXX")"; \ + trap 'rm -rf "$$tmp_dir"' EXIT; \ help_output="$$("$$bin" --help)"; \ version_output="$$("$$bin" --version)"; \ echo "$$help_output" | grep -q "USAGE:"; \ echo "$$version_output" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9.]+)?$$'; \ - socket="/tmp/prowl-cli-smoke-$$RANDOM.sock"; \ - PROWL_CLI_SOCKET="$$socket" "$$bin" list --json >/tmp/prowl-cli-smoke.json || true; \ - jq -e '.error.code == "APP_NOT_RUNNING"' /tmp/prowl-cli-smoke.json >/dev/null + socket="$$tmp_dir/cli.sock"; \ + response="$$tmp_dir/response.json"; \ + PROWL_CLI_SOCKET="$$socket" "$$bin" list --json >"$$response" || true; \ + jq -e '.error.code == "APP_NOT_RUNNING"' "$$response" >/dev/null test-cli-integration: # Run CLI integration tests via SwiftPM @test_list="$$(swift test list)"; \ diff --git a/docs-ai/016-dev-build-and-ci-workflow/005-build-test-time-optimization.md b/docs-ai/016-dev-build-and-ci-workflow/005-build-test-time-optimization.md index 3fa7d117..ab2c9b44 100644 --- a/docs-ai/016-dev-build-and-ci-workflow/005-build-test-time-optimization.md +++ b/docs-ai/016-dev-build-and-ci-workflow/005-build-test-time-optimization.md @@ -136,7 +136,9 @@ PR #678 implemented the planned build graph and cache changes: inference outside `#expect`; rerunning the 500 ms diagnostics reported neither hotspot. - `test-app` validates the successful `.xcresult` contains a passing, non-empty test run; `test-cli-integration` lists tests first and rejects a filter matching zero tests. These - guards close SwiftPM/Xcode's otherwise-successful empty-test false-negative path. + guards close SwiftPM/Xcode's otherwise-successful empty-test false-negative path. CLI + smoke output uses a unique temporary directory so parallel integration cleanup cannot + remove its response file. Local M2 Pro / Xcode 26.6 verification after implementation: