Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-ronstadt committed Jan 16, 2024
1 parent 7f5001d commit a0841fc
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/drivers/test/build_create_analyze_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ def create_codeql_database(ql_test):
None
"""

# Create the CodeQL database
os.makedirs("TestDB", exist_ok=True)
if os.path.exists("TestDB\\"+ql_test.get_ql_name()):
Expand Down Expand Up @@ -723,6 +724,14 @@ def find_sln_file(path):
no_build = False

start_time = time.time()
if not "--no_clean" in sys.argv and not "--database" in sys.argv:
print("Cleaning working directories: TestDB, working, AnalysisFiles")
if os.path.exists("TestDB"):
shutil.rmtree("TestDB")
if os.path.exists("working"):
shutil.rmtree("working")
if os.path.exists("AnalysisFiles"):
shutil.rmtree("AnalysisFiles")

cwd = os.getcwd()
path = os.path.normpath(cwd)
Expand All @@ -731,6 +740,8 @@ def find_sln_file(path):

dir_to_search ="/".join(path[0:path.index(root_dir)+1])
extension_to_search = ".ql"


ql_tests = find_ql_test_paths(dir_to_search,extension_to_search)

driver_sln_files = []
Expand Down Expand Up @@ -785,15 +796,7 @@ def find_sln_file(path):



if not "--no_clean" in sys.argv and not existing_database:
print("Cleaning working directories: TestDB, working, AnalysisFiles")
if os.path.exists("TestDB"):
shutil.rmtree("TestDB")
if os.path.exists("working"):
shutil.rmtree("working")
if os.path.exists("AnalysisFiles"):
shutil.rmtree("AnalysisFiles")



if "-t" in sys.argv:
# TODO not set up for external drivers
Expand Down

0 comments on commit a0841fc

Please sign in to comment.