6 %% A helper to test quickcheck properties on a running broker
7 %% NodeStr is a local broker node name
8 %% ModStr is the module containing quickcheck properties
9 %% TrialsStr is the number of trials
10 main([NodeStr, ModStr, TrialsStr]) ->
11 {ok, Hostname} = inet:gethostname(),
12 Node = list_to_atom(NodeStr ++ "@" ++ Hostname),
13 Mod = list_to_atom(ModStr),
14 Trials = erlang:list_to_integer(TrialsStr),
15 case rpc:call(Node, code, ensure_loaded, [proper]) of
17 case rpc:call(Node, proper, module,
18 [Mod] ++ [[{numtests, Trials}, {constraint_tries, 200}]]) of
23 io:format("Could not contact node ~p: ~p.~n", [Node, Reason]),
26 io:format("Module PropEr was not found on node ~p~n", [Node]),
30 io:format("This script requires a node name and a module.~n").
34 {unix, _} -> halt(Status);
35 {win32, _} -> init:stop(Status)