diff options
| author | Emile Joubert <emile@rabbitmq.com> | 2011-07-01 16:08:19 +0100 |
|---|---|---|
| committer | Emile Joubert <emile@rabbitmq.com> | 2011-07-01 16:08:19 +0100 |
| commit | 70cb2766d7d54a1ba94bedb936497efce954de68 (patch) | |
| tree | 08b43c290f78b8bc945d7025fa81b8b10232e496 /quickcheck | |
| parent | f131ad2fea33d5d2b7de676167c5cfa981f93910 (diff) | |
| download | rabbitmq-server-git-70cb2766d7d54a1ba94bedb936497efce954de68.tar.gz | |
Better code coverage
Diffstat (limited to 'quickcheck')
| -rwxr-xr-x | quickcheck | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/quickcheck b/quickcheck index 24edae7031..a36cf3ed86 100755 --- a/quickcheck +++ b/quickcheck @@ -8,8 +8,9 @@ %% ModStr is the module containing quickcheck properties %% The number of trials is optional main([NodeStr, ModStr | TrialsStr]) -> - Node = list_to_atom(NodeStr ++ "@" ++ net_adm:localhost()), - Mod = list_to_atom(ModStr), + {ok, Hostname} = inet:gethostname(), + Node = list_to_atom(NodeStr ++ "@" ++ Hostname), + Mod = list_to_atom(ModStr), Trials = lists:map(fun erlang:list_to_integer/1, TrialsStr), case rpc:call(Node, code, ensure_loaded, [proper]) of {module, proper} -> @@ -17,8 +18,11 @@ main([NodeStr, ModStr | TrialsStr]) -> [] -> ok; _ -> quit(1) end; - _ -> - io:format("PropEr module not present on node ~p.~n", [Node]), + {badrpc, Reason} -> + io:format("Could not contact node ~p: ~p.~n", [Node, Reason]), + quit(2); + {error,nofile} -> + io:format("Module PropEr was not found on node ~p~n", [Node]), quit(2) end; main([]) -> |
