Skip to content

Commit

Permalink
Del objects in runner
Browse files Browse the repository at this point in the history
  • Loading branch information
carl-baillargeon committed Aug 28, 2024
1 parent 0c88cf6 commit ccb02dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion anta/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ async def main( # noqa: PLR0913
)

tests_generator = generate_tests(selected_tests)
total_tests = catalog.final_tests_count

# Cleanup no longer needed objects before running the tests
del inventory, catalog, selected_tests

if dry_run:
logger.info("Dry-run mode, exiting before running the tests.")
Expand All @@ -323,7 +327,7 @@ async def main( # noqa: PLR0913
return

if AntaTest.progress is not None:
AntaTest.nrfu_task = AntaTest.progress.add_task("Running NRFU Tests...", total=catalog.final_tests_count)
AntaTest.nrfu_task = AntaTest.progress.add_task("Running NRFU Tests...", total=total_tests)

with Catchtime(logger=logger, message="Running ANTA tests"):
async for result in run_tests(tests_generator, limit=max_concurrency):
Expand Down

0 comments on commit ccb02dc

Please sign in to comment.