Blame view

scripts/run_regression_tests.sh 848 Bytes
99b72698   tangwang   测试回归钩子梳理
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  #!/bin/bash
  # 回归锚点脚本:发版 / 大合并前必跑的回归集合。
  #
  # 选中策略:所有 @pytest.mark.regression 用例,即 docs/测试Pipeline说明.md
  # “回归钩子矩阵” 中列出的各子系统锚点。
  #
  # 可选参数:
  #   SUBSYSTEM=search  ./scripts/run_regression_tests.sh   # 只跑某个子系统的回归子集
  #
  # 约束:本脚本不启外部依赖(ES / DeepL / LLM 全 fake)。如需真实依赖,请用
  # tests/manual 下的脚本。
  
  set -euo pipefail
  
  cd "$(dirname "$0")/.."
  source ./activate.sh
  
  SUBSYSTEM="${SUBSYSTEM:-}"
  
  if [[ -n "${SUBSYSTEM}" ]]; then
      echo "==> Running regression subset: subsystem=${SUBSYSTEM}"
      python -m pytest tests/ -q -m "${SUBSYSTEM} and regression"
  else
      echo "==> Running full regression anchor suite..."
      python -m pytest tests/ -q -m regression
  fi