update DB table
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user