diff --git a/tests/test_all.py b/tests/test_all.py index 03d9b16..2dfaafd 100755 --- a/tests/test_all.py +++ b/tests/test_all.py @@ -7,6 +7,7 @@ from utility.run_all import run_all if __name__ == "__main__": run_all( test_dir = os.path.dirname(__file__), - slow_tests={"random_test.py", "same_root_test.py"}, + slow_tests={"mine_test.py", "random_test.py", "same_root_test.py"}, long_manual_tests={"fuzz_test.py"}, + single_run_tests={"mine_with_market_test.py"}, ) \ No newline at end of file diff --git a/tests/utility/run_all.py b/tests/utility/run_all.py index 861f2f3..9ce3dee 100644 --- a/tests/utility/run_all.py +++ b/tests/utility/run_all.py @@ -58,7 +58,7 @@ def run_single_test(py, script, test_dir, index, port_min, port_max): raise err print_testcase_result(BLUE, TICK, script, start_time) -def run_all(test_dir: str, test_subdirs: list[str]=[], slow_tests: set[str]={}, long_manual_tests: set[str]={}): +def run_all(test_dir: str, test_subdirs: list[str]=[], slow_tests: set[str]={}, long_manual_tests: set[str]={}, single_run_tests: set[str]={}): tmp_dir = os.path.join(test_dir, "tmp") if not os.path.exists(tmp_dir): os.makedirs(tmp_dir, exist_ok=True) @@ -102,7 +102,7 @@ def run_all(test_dir: str, test_subdirs: list[str]=[], slow_tests: set[str]={}, for file in os.listdir(subdir_path): if file.endswith("_test.py"): rel_path = os.path.join(subdir, file) - if rel_path not in slow_tests and rel_path not in long_manual_tests: + if rel_path not in slow_tests and rel_path not in long_manual_tests and rel_path not in single_run_tests: TEST_SCRIPTS.append(rel_path) executor = ProcessPoolExecutor(max_workers=options.max_workers) @@ -135,6 +135,18 @@ def run_all(test_dir: str, test_subdirs: list[str]=[], slow_tests: set[str]={}, print("CalledProcessError " + repr(err)) failed.add(script) + # Run single tests one by one + for script in single_run_tests: + f = executor.submit( + run_single_test, py, script, test_dir, i, options.port_min, options.port_max + ) + try: + f.result() + except subprocess.CalledProcessError as err: + print("CalledProcessError " + repr(err)) + failed.add(script) + i += 1 + print("Elapsed: " + str(int(time.time() - start_time)) + " seconds", flush=True) if len(failed) > 0: