from collections.abc import Callable import json import sys import os import shutil import thread_manager import parsing import execution excutable: str = sys.argv[1] valgrind: bool = bool(sys.argv[2]) with open('test/tests.json', 'r') as file: tests: dict[str, dict] = json.load(file) tester: dict[str, Callable[[str, dict], None]] = {"parsing": parsing.test_parsing, "excution": execution.test_excution} shutil.rmtree("log") for category_name, tests in tests.items(): print(category_name, end="\n" * 2) tester[category_name](valgrind, excutable, tests, f"log/{category_name}") thread_manager.wait_pool()