Skip to content

Commit

Permalink
Remove output dirs before execution
Browse files Browse the repository at this point in the history
  • Loading branch information
mjain-jump committed Apr 11, 2024
1 parent 65021bc commit 1c3988e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test_suite/test_suite.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from collections import Counter
import shutil
from typing import List
import typer
import ctypes
Expand Down Expand Up @@ -103,6 +104,8 @@ def consolidate_logs(
),
):
# Create the output directory, if necessary
if output_dir.exists():
shutil.rmtree(output_dir)
output_dir.mkdir(parents=True, exist_ok=True)

# Iterate through each library
Expand Down Expand Up @@ -172,6 +175,8 @@ def check_consistency(
globals.n_iterations = num_iterations

# Create the output directory, if necessary
if globals.output_dir.exists():
shutil.rmtree(globals.output_dir)
globals.output_dir.mkdir(parents=True, exist_ok=True)

# Generate the test cases in parallel from files on disk
Expand Down Expand Up @@ -293,6 +298,8 @@ def run_tests(
globals.solana_shared_library = solana_shared_library

# Create the output directory, if necessary
if globals.output_dir.exists():
shutil.rmtree(globals.output_dir)
globals.output_dir.mkdir(parents=True, exist_ok=True)

# Initialize shared libraries
Expand Down Expand Up @@ -365,6 +372,8 @@ def decode_protobuf(
),
):
# Create the output directory, if necessary
if output_dir.exists():
shutil.rmtree(output_dir)
output_dir.mkdir(parents=True, exist_ok=True)

# Keep track of how many files were (un)successfully written
Expand Down

0 comments on commit 1c3988e

Please sign in to comment.