Skip to content

Commit 14b12c0

Browse files
committed
test(context-mode): diagnose nested smoke failures
1 parent 00f0277 commit 14b12c0

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

tests/plugins/context-mode/test-nested-mcp-smoke.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
#!/usr/bin/env bash
2-
set -euo pipefail
2+
set -Eeuo pipefail
3+
4+
report_error() {
5+
local status=$? line=$1 command=$2
6+
printf 'nested MCP smoke failed at line %s (exit %s): %s\n' \
7+
"$line" "$status" "$command" >&2
8+
return "$status"
9+
}
10+
11+
trap 'report_error "$LINENO" "$BASH_COMMAND"' ERR
312

413
root=$(CDPATH= cd -- "$(dirname -- "$0")/../../.." && pwd)
514
tmp=$(mktemp -d "${TMPDIR:-/tmp}/context-mode-nested-smoke.XXXXXX")

0 commit comments

Comments
 (0)