summaryrefslogtreecommitdiff
path: root/inttest/proto_protobuffs
diff options
context:
space:
mode:
authorTomas Abrahamsson <tomas.abrahamsson@gmail.com>2015-01-08 23:17:11 +0100
committerTomas Abrahamsson <tomas.abrahamsson@gmail.com>2015-01-10 23:18:49 +0100
commita8ffba6da55b2ad24861e9c3a41351a4950322ec (patch)
tree26918a2a300bdd6d3e6872f8127e69dc7d24753c /inttest/proto_protobuffs
parent2af51af986b26b7f68ecb01377ca759e3b5cb536 (diff)
downloadrebar-a8ffba6da55b2ad24861e9c3a41351a4950322ec.tar.gz
Copy instead of rsync gpb and protobuffs inttest mocks
Installation of the gpb and protobuffs mocks, in inttest, is now done using copy in proto_{gpb,protobuffs}_rt:files/0. Previously, rebar prepare-deps was used, the dependencies had an rsync source with a relative path back to the inttest directory. This eliminates a dependency in inttest to rsync, instead relying on retest's functionality to copy files and directories. Also, it eliminates hidden knowledge about the directory layout that retest chooses. Idea and suggestion by Tuncer Ayaz. Since the dependency sources in the inttest rebar.config files are no longer used, they are now changed back from rsync paths to git urls, to serve as examples.
Diffstat (limited to 'inttest/proto_protobuffs')
-rw-r--r--inttest/proto_protobuffs/proto_protobuffs_rt.erl2
-rw-r--r--inttest/proto_protobuffs/rebar.config8
2 files changed, 8 insertions, 2 deletions
diff --git a/inttest/proto_protobuffs/proto_protobuffs_rt.erl b/inttest/proto_protobuffs/proto_protobuffs_rt.erl
index bd03033..1bb7b5e 100644
--- a/inttest/proto_protobuffs/proto_protobuffs_rt.erl
+++ b/inttest/proto_protobuffs/proto_protobuffs_rt.erl
@@ -48,11 +48,11 @@ files() ->
{copy, "rebar.config", "rebar.config"},
{copy, "include", "include"},
{copy, "src", "src"},
+ {copy, "mock", "deps"},
{create, "ebin/foo.app", app(foo, ?MODULES)}
].
run(_Dir) ->
- ?assertMatch({ok, _}, retest_sh:run("./rebar prepare-deps", [])),
?assertMatch({ok, _}, retest_sh:run("./rebar clean", [])),
?assertMatch({ok, _}, retest_sh:run("./rebar compile", [])),
ok = check_beams_generated(),
diff --git a/inttest/proto_protobuffs/rebar.config b/inttest/proto_protobuffs/rebar.config
index 86813f3..0367ee2 100644
--- a/inttest/proto_protobuffs/rebar.config
+++ b/inttest/proto_protobuffs/rebar.config
@@ -8,7 +8,13 @@
{deps,
[
- {protobuffs, [], {rsync, "../../../inttest/proto_protobuffs/mock/protobuffs"}}
+ %% The dependency below to protobuffs is needed for "rebar compile" to
+ %% work, thus for the inttest to work, but the protobuffs that is actually
+ %% used in inttest is brought in from the inttest/proto_protobuffs/mock
+ %% subdirectory, not from the source below. The dependency is
+ %% needed, but the git url serves mostly as an example.
+ {protobuffs, [], {git, "git://github.com/basho/erlang_protobuffs",
+ {branch, "master"}}}
]}.
%% The default proto compiler is protobuffs