Skip to content

Commit

Permalink
do not look for Ultimate binary to verify Ultimate dir, look for one …
Browse files Browse the repository at this point in the history
…of the launchers
  • Loading branch information
danieldietsch committed Nov 6, 2024
1 parent c0da51f commit 888a0ad
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions benchexec/tools/ultimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import glob
import logging
import os
from pathlib import Path
import re
import shlex
import shutil
Expand Down Expand Up @@ -72,15 +73,13 @@ def project_url(self):

def executable(self, tool_locator):
exe = tool_locator.find_executable("Ultimate.py")
dir_name = os.path.dirname(exe)
logging.debug("Looking in %s for Ultimate and plugins/", dir_name)
for _, dir_names, file_names in os.walk(dir_name):
if "Ultimate" in file_names and "plugins" in dir_names:
return exe
break
dir_name = Path(os.path.dirname(exe))
logging.debug(f"Checking if {dir_name} contains a launcher jar")
if any([(dir_name / rel_launcher).exists() for rel_launcher in _LAUNCHER_JARS]):
return exe
msg = (
f"ERROR: Did find a Ultimate.py in {os.path.dirname(exe)} "
f"but no 'Ultimate' or no 'plugins' directory besides it"
f"but no launcher .jar besides it"
)
raise ToolNotFoundException(msg)

Expand Down

0 comments on commit 888a0ad

Please sign in to comment.