Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tsoc
hg-misc-tools
Commits
c5912e3b
"superbench/vscode:/vscode.git/clone" did not exist on "6d895da83c5b0490bf26d7c4cdf2903abbb660e3"
Commit
c5912e3b
authored
Feb 28, 2026
by
one
Browse files
[hytop] Inject hy-smi path for robustness
parent
9e35a37b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
projects/hytop/src/hytop/core/ssh.py
projects/hytop/src/hytop/core/ssh.py
+6
-0
projects/hytop/tests/test_ssh.py
projects/hytop/tests/test_ssh.py
+5
-0
No files found.
projects/hytop/src/hytop/core/ssh.py
View file @
c5912e3b
...
...
@@ -120,6 +120,8 @@ def collect_from_host(
[
*
_build_ssh_option_args
(
ssh_timeout
=
ssh_timeout
,
ssh_options
=
ssh_options
),
target
.
hostname
,
"env"
,
"PATH=/opt/hyhal/bin:$PATH"
,
"hy-smi"
,
*
hy_smi_args
,
]
...
...
@@ -178,6 +180,8 @@ def collect_python_from_host(
[
*
_build_ssh_option_args
(
ssh_timeout
=
ssh_timeout
,
ssh_options
=
ssh_options
),
target
.
hostname
,
"env"
,
"PATH=/opt/hyhal/bin:$PATH"
,
_build_remote_python_shell_command
(
python_code
),
]
)
...
...
@@ -229,6 +233,8 @@ def build_remote_python_command(
[
*
_build_ssh_option_args
(
ssh_timeout
=
ssh_timeout
,
ssh_options
=
ssh_options
),
target
.
hostname
,
"env"
,
"PATH=/opt/hyhal/bin:$PATH"
,
_build_remote_python_shell_command
(
python_code
),
]
)
...
...
projects/hytop/tests/test_ssh.py
View file @
c5912e3b
...
...
@@ -93,6 +93,7 @@ class TestCollectFromHostRemote:
assert
"BatchMode=yes"
in
cmd
assert
"-n"
in
cmd
assert
"-T"
in
cmd
assert
"env"
in
cmd
@
patch
(
"hytop.core.ssh.subprocess.run"
)
def
test_hy_smi_args_forwarded
(
self
,
mock_run
):
...
...
@@ -115,6 +116,8 @@ class TestCollectPythonFromHost:
collect_python_from_host
(
"node01"
,
ssh_timeout
=
5
,
cmd_timeout
=
10
,
python_code
=
"print('ok')"
)
cmd
=
mock_run
.
call_args
[
0
][
0
]
assert
cmd
[
0
]
==
"ssh"
assert
"env"
in
cmd
assert
any
(
"PATH=/opt/hyhal/bin"
in
str
(
part
)
for
part
in
cmd
)
assert
any
(
str
(
part
).
startswith
(
"python3 -c "
)
for
part
in
cmd
)
@
patch
(
"hytop.core.ssh.subprocess.run"
)
...
...
@@ -199,6 +202,8 @@ class TestHostTargetParsing:
assert
cmd
[
0
]
==
"ssh"
assert
"-p"
in
cmd
assert
"3333"
in
cmd
assert
"env"
in
cmd
assert
any
(
"PATH=/opt/hyhal/bin"
in
str
(
part
)
for
part
in
cmd
)
@
patch
(
"hytop.core.ssh.subprocess.run"
)
def
test_collect_python_from_host_custom_port
(
self
,
mock_run
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment