This commit is contained in:
2026-03-15 05:37:15 +01:00
parent 7ac487f640
commit 59db877c85
17 changed files with 622 additions and 21 deletions

38
core/test_runner.sh Normal file
View File

@@ -0,0 +1,38 @@
#!/usr/bin/env bash
test_runner_smoke() {
ui_section "Smoke test"
bash "$RUNTIME_PROJECT_ROOT/tests/smoke.sh"
}
test_runner_module() {
local module_id="$1"
local test_path=""
test_path="$(registry_module_test_path "$module_id")"
if [[ -z "$test_path" || ! -f "$test_path" ]]; then
ui_warn "Aucun test disponible pour $module_id"
return 1
fi
ui_section "Test du module $module_id"
bash "$test_path"
}
test_runner_all_modules() {
local module_id=""
local failures=0
while IFS= read -r module_id; do
[[ -n "$module_id" ]] || continue
if ! test_runner_module "$module_id"; then
failures=$((failures + 1))
fi
done < <(registry_list)
if [[ "$failures" -eq 0 ]]; then
ui_success "Tous les tests modules se sont termines sans echec"
else
ui_warn "$failures test(s) module(s) ont retourne un echec"
fi
}