use position as index for test cases to prevent key overwrite on test output
This commit is contained in:
@@ -698,13 +698,12 @@ def main() -> int:
|
|||||||
if not json_output:
|
if not json_output:
|
||||||
print_result(result, verbose=verbose, show_apks=show_apks)
|
print_result(result, verbose=verbose, show_apks=show_apks)
|
||||||
else:
|
else:
|
||||||
result_map: dict[str, TestResult] = {}
|
result_map: dict[int, TestResult] = {}
|
||||||
with ThreadPoolExecutor(max_workers=workers) as pool:
|
with ThreadPoolExecutor(max_workers=workers) as pool:
|
||||||
futures = {pool.submit(test_app, app): app for app in apps}
|
futures = {pool.submit(test_app, app): i for i, app in enumerate(apps)}
|
||||||
for future in as_completed(futures):
|
for future in as_completed(futures):
|
||||||
result = future.result()
|
result_map[futures[future]] = future.result()
|
||||||
result_map[result.app_id] = result
|
results = [result_map[i] for i in range(len(apps))]
|
||||||
results = [result_map[app["id"]] for app in apps]
|
|
||||||
if not json_output:
|
if not json_output:
|
||||||
for result in results:
|
for result in results:
|
||||||
print_result(result, verbose=verbose, show_apks=show_apks)
|
print_result(result, verbose=verbose, show_apks=show_apks)
|
||||||
|
|||||||
Reference in New Issue
Block a user