diff options
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([]) -> |
