mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-13 11:06:31 +00:00
Fix and set to MODE_MULTIPROCESSING
This commit is contained in:
parent
98d0ca48b8
commit
3ae4bf14f1
@ -40,7 +40,7 @@ TIME_THRESHOLD_TO_PRINT = 1.0 # seconds
|
|||||||
MODE_SINGLE_PROCESS = 'MODE_SINGLE_PROCESS'
|
MODE_SINGLE_PROCESS = 'MODE_SINGLE_PROCESS'
|
||||||
MODE_MULTIPROCESSING = 'MODE_MULTIPROCESSING'
|
MODE_MULTIPROCESSING = 'MODE_MULTIPROCESSING'
|
||||||
|
|
||||||
GENERATOR_MODE = MODE_SINGLE_PROCESS
|
GENERATOR_MODE = MODE_MULTIPROCESSING
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@ -330,7 +330,7 @@ def generate_test_vector(test_case, case_dir, log_file, file_mode):
|
|||||||
else:
|
else:
|
||||||
# If no written_part, the only file was incomplete_tag_file. Clear the existing case_dir folder.
|
# If no written_part, the only file was incomplete_tag_file. Clear the existing case_dir folder.
|
||||||
if not written_part:
|
if not written_part:
|
||||||
print(f"test case {case_dir} did not produce any written_part")
|
print(f"[Error] test case {case_dir} did not produce any written_part")
|
||||||
shutil.rmtree(case_dir)
|
shutil.rmtree(case_dir)
|
||||||
result = -1
|
result = -1
|
||||||
else:
|
else:
|
||||||
@ -384,6 +384,7 @@ def output_part(case_dir, log_file, out_kind: str, name: str, fn: Callable[[Path
|
|||||||
|
|
||||||
def execute_test(test_case, case_dir, meta, log_file, file_mode, cfg_yaml, yaml):
|
def execute_test(test_case, case_dir, meta, log_file, file_mode, cfg_yaml, yaml):
|
||||||
result = test_case.case_fn()
|
result = test_case.case_fn()
|
||||||
|
written_part = False
|
||||||
for (name, out_kind, data) in result:
|
for (name, out_kind, data) in result:
|
||||||
written_part = True
|
written_part = True
|
||||||
if out_kind == "meta":
|
if out_kind == "meta":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user