find_exe#

pytest_bluezenv.find_exe(subdir, name)[source]#

Find absolute path to the given executable, either within BlueZ build directory or on host.

Parameters:
  • subdir (str) – BlueZ source subdirectory, e.g. "src" or "client". Use "" for programs not built by BlueZ.

  • name (str) – executable name.

Returns:

absolute path to the executable.

Return type:

str

Raises:

FileNotFoundError – if the executable is not found.

Example

from pytest_bluezenv import find_exe
bluetoothctl = find_exe("client", "bluetoothctl")