mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 08:20:31 +08:00
7b2bd307f1
- backend/: 13 Maven modules (cw-elevator-application, cloudwalk-cloud, intelligent-cwoscomponent, ninca-crk, etc.) - frontend/: 4 Vue projects (elevator-front, cwos-portal, alarm-front, front_acs) + decompiled + scripts - scripts/: build, test-env, tools (Docker Compose, service templates, API parity) - docs/: AGENTS.md, superpowers specs, architecture docs - .gitignore: standard Java/Maven exclusions Moved from legacy maven-*/ root layout to backend/ organized structure.
35 lines
1.7 KiB
Bash
Executable File
35 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# 本脚本位于 maven-cw-elevator-application/scripts/:先打新包,再跑对拍用例与报告
|
|
set -e
|
|
REPO="$(cd "$(dirname "$0")/.." && pwd)"
|
|
TOOL="${REPO}/tools/elevator_api_parity"
|
|
JAR_NEW="${REPO}/cw-elevator-application-starter/target/cw-elevator-application-2.0.0.jar"
|
|
JAR_LEGACY_DEFAULT="$(cd "$REPO/.." && pwd)/cw-elevator-application-V1.0.0.20211103/cw-elevator-application-V1.0.0.20211103.jar"
|
|
JAR_LEGACY="${ELEVATOR_JAR_LEGACY:-$JAR_LEGACY_DEFAULT}"
|
|
|
|
if [[ -z "${JAVA_8:-}" ]]; then
|
|
for d in /usr/lib/jvm/java-8-openjdk-amd64 /usr/lib/jvm/java-1.8.0-openjdk; do
|
|
if [[ -x "$d/bin/java" ]]; then
|
|
export JAVA_8="$d"
|
|
break
|
|
fi
|
|
done
|
|
fi
|
|
: "${JAVA_8:=/usr/lib/jvm/java-8-openjdk-amd64}"
|
|
export JAVA_HOME="$JAVA_8"
|
|
export PATH="$JAVA_HOME/bin:$PATH"
|
|
|
|
cd "$REPO"
|
|
echo "==> mvn package (skip tests)"
|
|
mvn -q -DskipTests clean package
|
|
echo "==> 新 JAR: $JAR_NEW [$(test -f "$JAR_NEW" && echo OK || echo 缺失)]"
|
|
echo "==> 基线 JAR(路径): $JAR_LEGACY [$(test -f "$JAR_LEGACY" && echo 存在 || echo 不存在,可设ELEVATOR_JAR_LEGACY)]"
|
|
echo " (对拍为 HTTP; 需另开终端分别 java -jar --server.port=18080/18081 与相同配置)"
|
|
(cd "$TOOL" && pip install -q -r requirements.txt 2>/dev/null || pip3 install -q -r requirements.txt 2>/dev/null || true)
|
|
echo "==> 单元(无联调): test_unit_compare"
|
|
export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
|
(cd "$TOOL" && python3 -m pytest tests/test_unit_compare.py -q --tb=short)
|
|
echo "==> 对拍(无两实例时跳过 test_parity_endpoints);不含单机 smoke"
|
|
(cd "$TOOL" && python3 -m pytest tests/test_unit_compare.py tests/test_parity_endpoints.py -q --tb=line)
|
|
echo "报告: $TOOL/report/ (对拍有执行且成功时由 pytest 会话写出 parity-*.md)"
|