From bf9fe2cb28b66189b8c5f709a154450a23decb5d Mon Sep 17 00:00:00 2001 From: Henrik Wachowitz Date: Thu, 14 Nov 2024 18:20:07 +0100 Subject: [PATCH] add containerImage arg --- contrib/vcloud/benchmarkclient_executor.py | 8 +++++--- contrib/vcloud/vcloudbenchmarkbase.py | 8 ++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/contrib/vcloud/benchmarkclient_executor.py b/contrib/vcloud/benchmarkclient_executor.py index fd2c99af5..f8d4781a2 100644 --- a/contrib/vcloud/benchmarkclient_executor.py +++ b/contrib/vcloud/benchmarkclient_executor.py @@ -5,14 +5,16 @@ # # SPDX-License-Identifier: Apache-2.0 -import sys import json import logging import os import shutil import subprocess +import sys + import benchexec.tooladapter import benchexec.util + from . import vcloudutil sys.dont_write_bytecode = True # prevent creation of .pyc files @@ -108,8 +110,8 @@ def execute_benchmark(benchmark, output_handler): cmdLine.extend(["--try-less-memory", str(benchmark.config.tryLessMemory)]) if benchmark.config.debug: cmdLine.extend(["--print-new-files", "true"]) - - start_time = benchexec.util.read_local_time() + if benchmark.config.containerImage: + cmdLine.extend(["--containerImage", str(benchmark.config.containerImage)]) cloud = subprocess.Popen( cmdLine, diff --git a/contrib/vcloud/vcloudbenchmarkbase.py b/contrib/vcloud/vcloudbenchmarkbase.py index 1d3660c06..6a281de81 100644 --- a/contrib/vcloud/vcloudbenchmarkbase.py +++ b/contrib/vcloud/vcloudbenchmarkbase.py @@ -97,6 +97,14 @@ def add_vcloud_args(self, vcloud_args): action="store_true", help="Prevents ivy from caching the downloaded jar files. This prevents clashes due to concurrent access to the cache.", ) + vcloud_args.add_argument( + self.get_param_name("cloudContainerImage"), + dest="containerImage", + metavar="IMAGE", + action="store", + type=str, + help="Use the specified container image for the execution of the benchmark.", + ) def get_param_name(self, pname): return "--v" + pname