Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions codeflash/verification/concolic_testing.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import ast
import os
import subprocess
import tempfile
import time
Expand Down Expand Up @@ -63,6 +64,13 @@ def generate_concolic_tests(
logger.info("Generating concolic opcode coverage tests for the original code…")
console.rule()
try:
env = os.environ.copy()
pythonpath = env.get("PYTHONPATH", "")
project_root_str = str(args.project_root)
if pythonpath:
env["PYTHONPATH"] = f"{project_root_str}{os.pathsep}{pythonpath}"
else:
env["PYTHONPATH"] = project_root_str
cover_result = subprocess.run(
[
SAFE_SYS_EXECUTABLE,
Expand All @@ -86,6 +94,7 @@ def generate_concolic_tests(
cwd=args.project_root,
check=False,
timeout=600,
env=env,
)
except subprocess.TimeoutExpired:
logger.debug("CrossHair Cover test generation timed out")
Expand Down
Loading