Skip to content

Commit 9bae43d

Browse files
committed
ssh: fix cli testcase in Windows
- add FIXME comment for logger events verification in parallel groups
1 parent 32bfd50 commit 9bae43d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lib/ssh/test/ssh_basic_SUITE.erl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@ end_per_testcase(TestCase, Config)
234234
end_per_testcase(TestCase, Config) ->
235235
process_events(TestCase, Config).
236236

237+
%% FIXME in parallel executions (p_basic group) this setup does not
238+
%% work log handlers are uniq per testcase, but they all receive same
239+
%% logger events; so if one testcase fails due to logger events, rest
240+
%% of group might fail as well
237241
process_events(TestCase, Config) ->
238242
{ok, Events} = ssh_test_lib:get_log_events(
239243
proplists:get_value(log_handler_ref, Config)),

lib/ssh/test/ssh_test_cli.erl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ terminate(_Why, _S) ->
7474
nop.
7575

7676
run_portprog(User, cli, TmpDir) ->
77-
Pty_bin = os:find_executable("cat"),
77+
Cmd = case os:type() of
78+
{win32, _} -> "cmd.exe";
79+
_ -> "cat"
80+
end,
81+
Pty_bin = os:find_executable(Cmd),
7882
ct:pal("Pty_bin = ~p", [Pty_bin]),
7983
ssh_test_lib:open_port({spawn_executable, Pty_bin},
8084
[stream,

0 commit comments

Comments
 (0)