Import
Functions
Exception Classes
Function Reference
run_custom_binary(binary_name, *args, **kwargs)
Execute a custom binary that was uploaded via lager binaries add.
Returns:
subprocess.CompletedProcess with attributes:
returncode- Exit code of the processstdout- Captured standard output (ifcapture_output=True)stderr- Captured standard error (ifcapture_output=True)
BinaryNotFoundError- If the binary doesn’t exist or isn’t executablesubprocess.TimeoutExpired- If the process times outsubprocess.CalledProcessError- Ifcheck=Trueand return code is non-zero
get_binary_path(binary_name)
Get the full filesystem path to a custom binary.
Returns:
str - Full path to the binary
Raises: BinaryNotFoundError - If the binary doesn’t exist or isn’t executable
list_binaries()
List all available custom binaries on the Lager Box.
list[str] - Sorted list of binary names
Examples
Run Device Interaction Tool
Run with Custom Environment
Check Available Binaries
Error Handling
Integration with Test Script
Uploading Binaries
Custom binaries are uploaded to the Lager Box using the CLI:Binary Location
On the Lager Box, custom binaries are stored at:- Host path:
/home/lagerdata/third_party/customer-binaries/ - Container path:
/home/www-data/customer-binaries/
Notes
- Binaries must be Linux x86_64 compatible (matching Lager Box architecture)
- Binary names cannot contain path separators (
/,\) or.. - Binaries must be executable (set automatically during upload)
- Default timeout is 30 seconds; use
timeout=Nonefor no limit - Use
capture_output=Falsefor interactive or streaming output - Environment variables are inherited from parent process unless
envis specified

