39 lines
868 B
Bash
39 lines
868 B
Bash
#!/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
|
|
}
|