Files
IPTables-Management/tests/run_all.sh
ahdoawhfo 26fbcf3584 Mark runnable scripts executable in git
The repo was committed from WSL with core.filemode=false, so the exec
bit was never recorded. After actions/checkout the entry script comes
down as 100644 and tests/test_cli.sh fails with Permission denied.

Set mode 100755 on every script that is invoked directly (entry,
installer, test suite, mock binaries). Sourced helpers under lib/
keep 100644 per convention.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 13:58:42 +08:00

38 lines
862 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
SKIP_INTEGRATION=0
for arg in "$@"; do
case ${arg} in
--skip-integration)
SKIP_INTEGRATION=1
;;
*)
printf '未知参数: %s\n' "${arg}" >&2
exit 1
;;
esac
done
run_test() {
local file=$1
printf '\n==> 运行 %s\n' "$(basename -- "${file}")"
bash "${file}"
}
run_test "${ROOT_DIR}/tests/test_common.sh"
run_test "${ROOT_DIR}/tests/test_cli.sh"
run_test "${ROOT_DIR}/tests/test_install.sh"
run_test "${ROOT_DIR}/tests/test_interactive.sh"
run_test "${ROOT_DIR}/tests/test_storage.sh"
run_test "${ROOT_DIR}/tests/test_env_check.sh"
run_test "${ROOT_DIR}/tests/test_rules_unit.sh"
if [[ ${SKIP_INTEGRATION} == 0 ]]; then
run_test "${ROOT_DIR}/tests/test_integration.sh"
fi
printf '\n全部测试完成。\n'