Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/man/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ LG_AGENT_PREFIX
Add a prefix to ``.labgrid_agent_{agent_hash}.py`` allowing specification for
where on the exporter it should be uploaded to.

LG_AGENT_PYTHON
~~~~~~~~~~~~~~~~~~~~~~
Set the python interpreter to be used by the agentwrapper on the exporter, can
be either a full path or an executable.

Matches
-------
Match patterns are used to assign a resource to a specific place. The format is:
Expand Down
3 changes: 2 additions & 1 deletion labgrid/util/agentwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(self, host=None):
os.path.abspath(os.path.dirname(__file__)),
'agent.py')
agent_prefix = os.environ.get("LG_AGENT_PREFIX", "")
agent_python = os.environ.get("LG_AGENT_PYTHON", "python3")
if host:
# copy agent.py and run via ssh
with open(agent, 'rb') as agent_fd:
Expand All @@ -61,7 +62,7 @@ def __init__(self, host=None):
f'{host}:{agent_remote}'],
)
self.agent = subprocess.Popen(
ssh_opts + [host, '--', 'python3', agent_remote],
ssh_opts + [host, '--', agent_python, agent_remote],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
start_new_session=True,
Expand Down
4 changes: 4 additions & 0 deletions man/labgrid-client.1
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,10 @@ unspecified, defaults to 30 seconds.
.sp
Add a prefix to \fB\&.labgrid_agent_{agent_hash}.py\fP allowing specification for
where on the exporter it should be uploaded to.
.SS LG_AGENT_PYTHON
.sp
Set the python interpreter to be used by the agentwrapper on the exporter, can
be either a full path or an executable.
.SH MATCHES
.sp
Match patterns are used to assign a resource to a specific place. The format is:
Expand Down
Loading