root 3 месяцев назад
Родитель
Сommit
757e8039c8
1 измененных файлов с 6 добавлено и 5 удалено
  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
 from pathlib import Path
 import re
 import re
 import subprocess
 import subprocess
+import sys
 import tempfile
 import tempfile
 import time
 import time
 
 
@@ -28,10 +29,10 @@ class Mutation:
 
 
 
 
 GATES = {
 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 = (
 MUTATIONS = (
     Mutation(
     Mutation(
@@ -202,7 +203,7 @@ def main() -> int:
         "tree": tree,
         "tree": tree,
         "clean_before": not bool(dirty),
         "clean_before": not bool(dirty),
         "clean_after": not bool(git("status", "--porcelain")),
         "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),
         "required_mutations": len(MUTATIONS),
         "detected_mutations": sum(bool(item["detected"]) for item in mutation_records),
         "detected_mutations": sum(bool(item["detected"]) for item in mutation_records),
         "container_image_id": os.environ.get("PROD2U_CONTAINER_IMAGE_ID"),
         "container_image_id": os.environ.get("PROD2U_CONTAINER_IMAGE_ID"),