From 7b8d9a66f6c3da07f98bfa25d4aa1c5323e91a8d Mon Sep 17 00:00:00 2001 From: Henrik Wachowitz Date: Wed, 11 Dec 2024 15:01:31 +0100 Subject: [PATCH] report error of missing tool_directory earlier --- contrib/vcloud-benchmark.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/vcloud-benchmark.py b/contrib/vcloud-benchmark.py index 0d446df89..932defcf2 100755 --- a/contrib/vcloud-benchmark.py +++ b/contrib/vcloud-benchmark.py @@ -23,7 +23,7 @@ import benchexec.benchexec # noqa E402 import benchexec.model # noqa E402 import benchexec.tools # noqa E402 -from benchexec import __version__ # noqa E402 +from benchexec import BenchExecException, __version__ # noqa E402 _ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "vcloud")) IVY_JAR_NAME = "ivy-2.5.0.jar" @@ -85,6 +85,13 @@ def hook_load_tool_info(tool_name, config): if not config.containerImage: return original_load_tool_info(tool_name, config) + if not config.tool_directory: + raise BenchExecException( + "Using a container image is currently only supported " + "if the tool directory is explicitly provided. Please set it " + "using the --tool-directory option." + ) + tool_module = tool_name if "." in tool_name else f"benchexec.tools.{tool_name}" try: