Skip to content

Commit

Permalink
report error of missing tool_directory earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
ricffb committed Dec 11, 2024
1 parent b519960 commit 7b8d9a6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion contrib/vcloud-benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 7b8d9a6

Please sign in to comment.