QAOPS9 P2D 细化实施准备

这个提交包含在:
2026-05-16 00:41:10 +08:00
父节点 2a2cfa8dd2
当前提交 cce0ecc8a3
共修改 6 个文件,包含 48 行新增和 27 行删除
+22 -1
查看文件
@@ -44,6 +44,8 @@ Usage: bash scripts/qa/run-business-flow-gates.sh <local|attached|list>
可选环境变量:
BUSINESS_FLOW_GROUPS=auth,reimbursement 仅运行部分业务域
BUSINESS_FLOW_EXCLUDE_SPECS=tests/e2e/a.spec.ts,tests/e2e/b.spec.ts
从已选业务域中排除指定 Playwright spec,多个值可用逗号或空白分隔
E2E_BASE_URL attached 模式下必填或沿用 Playwright 默认
USAGE
}
@@ -140,11 +142,30 @@ selected_groups() {
printf '%s\n' "${GROUP_ORDER[@]}"
}
spec_is_excluded() {
local candidate="$1"
local raw="${BUSINESS_FLOW_EXCLUDE_SPECS:-}"
local excluded
[[ -n "$raw" ]] || return 1
while IFS= read -r excluded; do
[[ -n "$excluded" ]] || continue
if [[ "$candidate" == "$excluded" ]]; then
return 0
fi
done < <(printf '%s\n' "$raw" | tr ',' '\n' | tr '[:space:]' '\n')
return 1
}
existing_specs_for_group() {
local group="$1"
local spec
while IFS= read -r spec; do
[[ -f "$CLIENT_DIR/$spec" ]] && printf '%s\n' "$spec"
[[ -f "$CLIENT_DIR/$spec" ]] || continue
spec_is_excluded "$spec" && continue
printf '%s\n' "$spec"
done < <(specs_for_group "$group")
}