diff --git a/src/teuthology_api/services/suite.py b/src/teuthology_api/services/suite.py index 99d2d6d..c1c5819 100644 --- a/src/teuthology_api/services/suite.py +++ b/src/teuthology_api/services/suite.py @@ -1,4 +1,5 @@ from datetime import datetime +from tempfile import NamedTemporaryFile import logging import teuthology.suite @@ -23,8 +24,20 @@ def run(args, send_logs: bool, access_token: str): try: args["--timestamp"] = datetime.now().strftime("%Y-%m-%d_%H:%M:%S") + temp_files: list[NamedTemporaryFile] = [] + if "" in args: + for config in args[""]: + temp_file = NamedTemporaryFile(suffix=".yaml") + temp_file.write(config.encode()) + temp_file.seek(0) + temp_files.append(temp_file) + args[""] = [file.name for file in temp_files] + logs = logs_run(teuthology.suite.main, args) + for file in temp_files: + file.close() + # get run details from paddles run_name = make_run_name( {