Commits

Oscar Hellström committed f8df311

Make starting of the clients easier.

Comments (0)

Files changed (1)

test/simple_load.erl

 	start_client("localhost", Port, Clients).
 
 start_client(Host, Port, Clients) when Clients > 0 ->
+	start_applications([crypto, ssl, lhttpc]),
 	process_flag(trap_exit, true),
 	{ok, Body} = file:read_file("test/1M"),
 	URL = "http://" ++ Host ++ ":" ++ integer_to_list(Port) ++ "/static/1M",
 
 terminate(_, _) ->
 	ok.
+
+start_applications(Apps) ->
+	Started = lists:map(fun({Name, _, _}) -> Name end,
+		application:which_applications()),
+	lists:foreach(fun(App) ->
+				case lists:member(App, Started) of
+					false -> ok = application:start(App);
+					true  -> ok
+				end
+		end, Apps).