Skip to content

Commit 7b8d9a6

Browse files
committed
report error of missing tool_directory earlier
1 parent b519960 commit 7b8d9a6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

contrib/vcloud-benchmark.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import benchexec.benchexec # noqa E402
2424
import benchexec.model # noqa E402
2525
import benchexec.tools # noqa E402
26-
from benchexec import __version__ # noqa E402
26+
from benchexec import BenchExecException, __version__ # noqa E402
2727

2828
_ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "vcloud"))
2929
IVY_JAR_NAME = "ivy-2.5.0.jar"
@@ -85,6 +85,13 @@ def hook_load_tool_info(tool_name, config):
8585
if not config.containerImage:
8686
return original_load_tool_info(tool_name, config)
8787

88+
if not config.tool_directory:
89+
raise BenchExecException(
90+
"Using a container image is currently only supported "
91+
"if the tool directory is explicitly provided. Please set it "
92+
"using the --tool-directory option."
93+
)
94+
8895
tool_module = tool_name if "." in tool_name else f"benchexec.tools.{tool_name}"
8996

9097
try:

0 commit comments

Comments
 (0)