diff --git a/devops/scripts/benchmarks/main.py b/devops/scripts/benchmarks/main.py index a63eca053a598..4ebafcea27f84 100755 --- a/devops/scripts/benchmarks/main.py +++ b/devops/scripts/benchmarks/main.py @@ -28,11 +28,9 @@ from utils.validate import Validate from utils.detect_versions import DetectVersion from utils.logger import log, initialize_logger +from utils.workdir_version import INTERNAL_WORKDIR_VERSION from presets import enabled_suites, presets -# Update this if you are changing the layout of the results files -INTERNAL_WORKDIR_VERSION = "2.0" - def run_iterations( benchmark: Benchmark, diff --git a/devops/scripts/benchmarks/tests/test_integration.py b/devops/scripts/benchmarks/tests/test_integration.py index f4be229404850..fc6c4482463dd 100644 --- a/devops/scripts/benchmarks/tests/test_integration.py +++ b/devops/scripts/benchmarks/tests/test_integration.py @@ -2,15 +2,20 @@ # Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions. # See LICENSE.TXT # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -import logging + +import json import os import shutil -import unittest -import tempfile import subprocess -import json +import sys +import tempfile +import unittest from collections import namedtuple +sys.path.append(f"{os.path.dirname(__file__)}/../") +from utils.workdir_version import INTERNAL_WORKDIR_VERSION + + DataJson = namedtuple("DataJson", ["runs", "metadata", "tags", "names"]) DataJsonRun = namedtuple("DataJsonRun", ["name", "results"]) DataJsonResult = namedtuple( @@ -49,7 +54,7 @@ def prepare_dirs(self): with open( os.path.join(self.WORKDIR_DIR, "BENCH_WORKDIR_VERSION"), "w" ) as f: - f.write("2.0") # TODO: take from main.INTERNAL_WORKDIR_VERSION + f.write(INTERNAL_WORKDIR_VERSION) def remove_dirs(self): for d in [self.RESULTS_DIR, self.OUTPUT_DIR, self.WORKDIR_DIR]: diff --git a/devops/scripts/benchmarks/utils/workdir_version.py b/devops/scripts/benchmarks/utils/workdir_version.py new file mode 100644 index 0000000000000..27a4204924faf --- /dev/null +++ b/devops/scripts/benchmarks/utils/workdir_version.py @@ -0,0 +1,7 @@ +# Copyright (C) 2025 Intel Corporation +# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions. +# See LICENSE.TXT +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +# Update this if you are changing the layout of the results files +INTERNAL_WORKDIR_VERSION = "2.0"