fix: relocate cwos-portal decompiled output to correct path; remove nested directory

Former-commit-id: dc30d42a8c55ed8b2382a41dc2434233fbed9930
This commit is contained in:
反编译工作区
2026-04-29 12:09:48 +08:00
parent ea8e492076
commit e8672a3c7b
1759 changed files with 547735 additions and 280 deletions
@@ -2,6 +2,9 @@
# 完整接口测试:V1/V2 单机冒烟 + 双端对拍 + 套件总览 Markdown。
# 前置:两 JAR 已分别启动(默认 http://127.0.0.1:18080 为 V1、18081 为 V2),且配置同一数据源/Redis。
# 用法:在 maven-cw-elevator-application 目录执行 ./scripts/run_full_elevator_api_suite.sh
#
# ELEVATOR_SUITE_STRICT=1:冒烟与对拍失败时脚本退出非 0(默认由 run_v1v2_parity_automated.sh 传入)。
# ELEVATOR_SUITE_STRICT=0:与旧行为一致,冒烟/对拍用「|| true」始终生成总览(便于无服务时只看单元测试)。
set -euo pipefail
REPO="$(cd "$(dirname "$0")/.." && pwd)"
@@ -13,6 +16,18 @@ export PIP_DISABLE_PIP_VERSION_CHECK=1
export ELEVATOR_BASE_OLD="${ELEVATOR_BASE_OLD:-http://127.0.0.1:18080}"
export ELEVATOR_BASE_NEW="${ELEVATOR_BASE_NEW:-http://127.0.0.1:18081}"
SUITE_STRICT="${ELEVATOR_SUITE_STRICT:-0}"
SUITE_FAIL=0
_py_maybe_ignore() {
if [[ "${SUITE_STRICT}" == "1" ]]; then
python3 -m pytest "$@" && return 0
return 1
fi
python3 -m pytest "$@" || true
return 0
}
cd "$TOOL"
python3 -m pip install -q -r requirements.txt 2>/dev/null || true
@@ -25,16 +40,16 @@ echo "==> 单元(compare 逻辑)"
python3 -m pytest tests/test_unit_compare.py -q --tb=short
echo "==> 冒烟 V1 ($ELEVATOR_BASE_OLD) [需该地址可访问 /actuator/health 等健康端点]"
python3 -m pytest tests/test_smoke_catalog.py -m smoke \
--smoke-base="$ELEVATOR_BASE_OLD" --smoke-label=v1_legacy $PTF || true
_py_maybe_ignore tests/test_smoke_catalog.py -m smoke \
--smoke-base="$ELEVATOR_BASE_OLD" --smoke-label=v1_legacy $PTF || SUITE_FAIL=1
echo "==> 冒烟 V2 ($ELEVATOR_BASE_NEW) [需该地址可访问 /actuator/health 等健康端点]"
python3 -m pytest tests/test_smoke_catalog.py -m smoke \
--smoke-base="$ELEVATOR_BASE_NEW" --smoke-label=v2_build $PTF || true
_py_maybe_ignore tests/test_smoke_catalog.py -m smoke \
--smoke-base="$ELEVATOR_BASE_NEW" --smoke-label=v2_build $PTF || SUITE_FAIL=1
echo "==> 横向对拍(两实例均需通过健康探针)"
python3 -m pytest tests/test_parity_endpoints.py -m live $PTF \
--base-old="$ELEVATOR_BASE_OLD" --base-new="$ELEVATOR_BASE_NEW" || true
echo "==> 横向对拍(两实例均需通过健康探针) [ELEVATOR_SUITE_STRICT=${SUITE_STRICT} ELEVATOR_PARITY_BOUNDARY=${ELEVATOR_PARITY_BOUNDARY:-0}]"
_py_maybe_ignore tests/test_parity_endpoints.py -m live $PTF \
--base-old="$ELEVATOR_BASE_OLD" --base-new="$ELEVATOR_BASE_NEW" || SUITE_FAIL=1
SUITE_TS="$(date +%Y%m%d-%H%M%S)"
_pick_newer() {
@@ -62,3 +77,8 @@ if [[ -z "$SMOKE_V1" && -z "$SMOKE_V2" && -z "$PARITY" ]]; then
echo " 快速探活: curl -s -o /dev/null -w '%{http_code}' $ELEVATOR_BASE_OLD/actuator/health"
fi
rm -f "$MARKER"
if [[ "${SUITE_FAIL}" -ne 0 ]]; then
echo "==> 套件步骤存在失败 (ELEVATOR_SUITE_STRICT=${SUITE_STRICT}, exit=${SUITE_FAIL})" >&2
fi
exit "${SUITE_FAIL}"