47 lines
1.2 KiB
Python
47 lines
1.2 KiB
Python
"""Run every component test in order. Stops at first failure.
|
|
|
|
docker compose exec voice-chat python -m tests.component.run_all
|
|
"""
|
|
import importlib
|
|
import sys
|
|
import traceback
|
|
|
|
|
|
SCRIPTS = [
|
|
"tests.component.test_01_video_skeleton",
|
|
"tests.component.test_02_wan22_loras",
|
|
"tests.component.test_03_idle_clip",
|
|
"tests.component.test_04_library_prebake",
|
|
"tests.component.test_05_musetalk_lipsync",
|
|
"tests.component.test_06_reflective",
|
|
"tests.component.test_07_endpoints",
|
|
"tests.component.test_08_lora_reload",
|
|
]
|
|
|
|
|
|
def main() -> int:
|
|
failed: list[str] = []
|
|
for name in SCRIPTS:
|
|
print(f"\n{'=' * 70}\nRUNNING: {name}\n{'=' * 70}")
|
|
try:
|
|
mod = importlib.import_module(name)
|
|
mod.run()
|
|
except SystemExit as e:
|
|
if e.code:
|
|
print(f"FAILED: {name} (exit {e.code})")
|
|
failed.append(name)
|
|
break # hard-stop on failure
|
|
except Exception:
|
|
traceback.print_exc()
|
|
failed.append(name)
|
|
break
|
|
if failed:
|
|
print(f"\n{len(failed)} failed: {failed}")
|
|
return 1
|
|
print("\nALL COMPONENT TESTS PASSED")
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|