Skip to content

Commit 5f29114

Browse files
committed
Merge branch 'dgud/ssl-test-windows' into maint
* dgud/ssl-test-windows: ssl: Skip cmd when starting wsl (test)
2 parents 26d1e24 + 6b5f815 commit 5f29114

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

lib/ssl/test/ssl_test_lib.erl

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3657,29 +3657,29 @@ portable_open_port("openssl" = Exe, Args0) ->
36573657
false ->
36583658
AbsPath = os:find_executable(Exe),
36593659
%% ?CT_LOG("open_port({spawn_executable, ~p}, [stderr_to_stdout,~n {args, \"~s\"}]).",
3660-
%% [AbsPath, lists:join($\s, Args0)]),
3660+
%% [AbsPath, lists:join($\s, Args0)]),
36613661
open_port({spawn_executable, AbsPath},
36623662
[{args, Args0}, stderr_to_stdout]);
3663-
_ ->
3664-
%% I can't get the new windows version of openssl.exe to be stable
3665-
%% certain server tests are failing for no reason.
3666-
%% This is using "linux" openssl via wslenv
3667-
3668-
Translate = fun([_Drive|":/" ++ _ ]= Path) ->
3669-
string:trim(os:cmd("wsl wslpath -u " ++ Path));
3670-
(Arg) ->
3671-
Arg
3672-
end,
3673-
Args1 = [Translate(Arg) || Arg <- Args0],
3674-
Args = ["/C","wsl","openssl"| Args1] ++ ["2>&1"],
3675-
Cmd = case erlang:system_info(wordsize) of
3676-
8 -> os:find_executable("cmd");
3677-
4 -> filename:join(os:getenv("WINDIR"),"sysnative/cmd")
3663+
_ ->
3664+
%% I can't get the new windows version of openssl.exe to be stable
3665+
%% certain server tests are failing for no reason.
3666+
%% This is using "linux" openssl via wslenv
3667+
3668+
Translate = fun([_Drive|":/" ++ _ ]= Path) ->
3669+
string:trim(os:cmd("wsl wslpath -u " ++ Path));
3670+
(Arg) ->
3671+
Arg
3672+
end,
3673+
Args1 = [Translate(Arg) || Arg <- Args0],
3674+
Args = ["openssl"| Args1] ++ ["2>&1"],
3675+
WSL = case erlang:system_info(wordsize) of
3676+
8 -> os:find_executable("wsl");
3677+
4 -> filename:join(os:getenv("WINDIR"),"sysnative/wsl")
36783678
end,
3679-
?CT_LOG("open_port({spawn_executable, ~p}, [stderr_to_stdout,~n {args, \"~s\"}]).",
3680-
[Cmd, lists:join($\s, Args)]),
3681-
open_port({spawn_executable, Cmd},
3682-
[{args, Args}, stderr_to_stdout, hide])
3679+
?CT_LOG("open_port({spawn_executable, ~p}, [hide, stderr_to_stdout,~n {args, ~p}]).",
3680+
[WSL, Args]),
3681+
open_port({spawn_executable, WSL},
3682+
[{args, Args}, stderr_to_stdout, hide])
36833683
end;
36843684
portable_open_port(Exe, Args) ->
36853685
AbsPath = os:find_executable(Exe),

0 commit comments

Comments
 (0)