@@ -164,12 +164,18 @@ erl_dummy_big(Config) when is_list(Config) ->
164164 notify (Result , Config , " erl_1M_file" ).
165165
166166wget_small (Config ) when is_list (Config ) ->
167- {ok , Result } = run_test (wget_client , " 1k_file" , Config ),
168- notify (Result , Config , " wget_1k_file" ).
167+ ensure_non_windows_and_executable_exists (" wget" ,
168+ fun () ->
169+ {ok , Result } = run_test (wget_client , " 1k_file" , Config ),
170+ notify (Result , Config , " wget_1k_file" )
171+ end ).
169172
170173wget_big (Config ) when is_list (Config ) ->
171- {ok , Result } = run_test (wget_client , " 1M_file" , Config ),
172- notify (Result , Config , " wget_1M_file" ).
174+ ensure_non_windows_and_executable_exists (" wget" ,
175+ fun () ->
176+ {ok , Result } = run_test (wget_client , " 1M_file" , Config ),
177+ notify (Result , Config , " wget_1M_file" )
178+ end ).
173179
174180httpc_small (Config ) when is_list (Config ) ->
175181 {ok , Result } = run_test (httpc_client , " 1k_file" , Config ),
@@ -485,16 +491,23 @@ start_web_server(Group, Config) when Group == https_inets;
485491
486492start_web_server (Group , Config ) when Group == http_nginx ;
487493 Group == http_nginx_keep_alive ->
488- case os :find_executable (" nginx" ) of
489- false -> {skip , " nginx not found" };
490- _ -> start_nginx (" http" , Config )
491- end ;
494+ ensure_non_windows_and_executable_exists (" nginx" ,
495+ fun () -> start_nginx (" http" , Config ) end );
492496
493497start_web_server (Group , Config ) when Group == https_nginx ;
494498 Group == https_nginx_keep_alive ->
495- case os :find_executable (" nginx" ) of
496- false -> {skip , " nginx not found" };
497- _ -> start_nginx (" https" , cert_opts (Config ) ++ Config )
499+ ensure_non_windows_and_executable_exists (" nginx" ,
500+ fun () -> start_nginx (" https" , cert_opts (Config ) ++ Config ) end ).
501+
502+ ensure_non_windows_and_executable_exists (Executable , SuccessFn ) ->
503+ case os :type () of
504+ {win32 , _ } ->
505+ {skip , " skip: not running the benchmark on Windows" };
506+ _ ->
507+ case os :find_executable (Executable ) of
508+ false -> {skip , " skip: executable not found: " ++ Executable };
509+ _Filename -> SuccessFn ()
510+ end
498511 end .
499512
500513start_inets_server (Protocol , ConfHttpd , Config ) ->
0 commit comments