Jelajahi Sumber

bind-mutation-python-runtime

root 3 bulan lalu
induk
melakukan
757e8039c8
1 mengubah file dengan 6 tambahan dan 5 penghapusan
  1. 6 5
      tools/run_6400_mutation.py

+ 6 - 5
tools/run_6400_mutation.py

@@ -11,6 +11,7 @@ import os
 from pathlib import Path
 import re
 import subprocess
+import sys
 import tempfile
 import time
 
@@ -28,10 +29,10 @@ class Mutation:
 
 
 GATES = {
-    "host": ["python3", "tests/cocotb/run_6400_v1_integration.py", "host_protocol"],
-    "control": ["python3", "tests/cocotb/run_6400_v1_integration.py", "control"],
-    "bmc": ["python3", "tests/cocotb/run_6400_bmc_fuzz.py"],
-    "pwm": ["python3", "tools/run_6400_v1.py", "pwm"],
+    "host": [sys.executable, "tests/cocotb/run_6400_v1_integration.py", "host_protocol"],
+    "control": [sys.executable, "tests/cocotb/run_6400_v1_integration.py", "control"],
+    "bmc": [sys.executable, "tests/cocotb/run_6400_bmc_fuzz.py"],
+    "pwm": [sys.executable, "tools/run_6400_v1.py", "pwm"],
 }
 MUTATIONS = (
     Mutation(
@@ -202,7 +203,7 @@ def main() -> int:
         "tree": tree,
         "clean_before": not bool(dirty),
         "clean_after": not bool(git("status", "--porcelain")),
-        "command": "python3 tools/run_6400_mutation.py",
+        "command": f"{sys.executable} tools/run_6400_mutation.py",
         "required_mutations": len(MUTATIONS),
         "detected_mutations": sum(bool(item["detected"]) for item in mutation_records),
         "container_image_id": os.environ.get("PROD2U_CONTAINER_IMAGE_ID"),