You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/07/31 23:31:02 UTC

[08/50] meck commit: updated refs/heads/master to dde7590

Make remote_setup more robust


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/348d356b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/348d356b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/348d356b

Branch: refs/heads/master
Commit: 348d356b081ca5094a9faf7c7d09a197f05372e8
Parents: 161e240
Author: ilja.bobkevic <il...@klarna.com>
Authored: Wed Aug 14 22:33:45 2013 +0200
Committer: ilja.bobkevic <il...@klarna.com>
Committed: Wed Aug 14 22:33:45 2013 +0200

----------------------------------------------------------------------
 test/meck_tests.erl | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/348d356b/test/meck_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_tests.erl b/test/meck_tests.erl
index 9e01952..12d26d3 100644
--- a/test/meck_tests.erl
+++ b/test/meck_tests.erl
@@ -758,12 +758,18 @@ remote_meck_test_() ->
 
 remote_setup() ->
     [] = os:cmd("epmd -daemon"),
-    Hostname = "localhost",
+    case node() of
+      'nonode@nohost' ->
+        Hostname = "localhost";
+      _ ->
+        Hostname = test_server_sup:hoststr()
+    end,
     Myself = list_to_atom("meck_eunit_test@" ++ Hostname),
     net_kernel:start([Myself, shortnames]),
     {ok, Node} = slave:start_link(list_to_atom(Hostname), meck_remote_test,
                                   "-pa test"),
     {Mod, Bin, File} = code:get_object_code(meck),
+    true = rpc:call(Node, code, add_path, [filename:dirname(File)]),
     {module, Mod} = rpc:call(Node, code, load_binary, [Mod, File, Bin]),
     {module, meck_test_module} =
         rpc:call(Node, code, load_file, [meck_test_module]),