update DB table

This commit is contained in:
2025-12-28 03:36:29 +01:00
parent 393e78defc
commit de08431e53
3 changed files with 111 additions and 40 deletions

View File

@@ -1,14 +1,8 @@
import os
import sys
import json
import subprocess
from scenario_exe_parser import parse_test_scenario
import subprocess
import os
import sys
import json
import subprocess
# Assuming parse_test_scenario is imported correctly
# from scenario_exe_parser import parse_test_scenario
# --- Global Paths ---
current_directory = os.path.dirname(os.path.abspath(__file__))
@@ -81,14 +75,26 @@ def run_test_suite(tasks):
for task in tasks:
print(f"--- Starting Task: {task['id']} ---")
result = subprocess.run(
# Use Popen to stream output in real-time
process = subprocess.Popen(
[shell_script, task['id'], task['cmd'], task['path'], REPO_PATH],
capture_output=True, text=True
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
text=True,
bufsize=1,
universal_newlines=True
)
print(result.stdout)
full_output = ""
for line in process.stdout:
print(line, end="")
full_output += line
process.wait()
json_found = False
for line in result.stdout.splitlines():
for line in full_output.splitlines():
if line.startswith("FINAL_JSON_OUTPUT:"):
json_string = line.replace("FINAL_JSON_OUTPUT:", "").strip()
try: