diff options
Diffstat (limited to 'inttest/proto_gpb/proto_gpb_rt.erl')
-rw-r--r-- | inttest/proto_gpb/proto_gpb_rt.erl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/inttest/proto_gpb/proto_gpb_rt.erl b/inttest/proto_gpb/proto_gpb_rt.erl index 8a7cacf..307aca0 100644 --- a/inttest/proto_gpb/proto_gpb_rt.erl +++ b/inttest/proto_gpb/proto_gpb_rt.erl @@ -30,7 +30,6 @@ -include_lib("eunit/include/eunit.hrl"). -include_lib("kernel/include/file.hrl"). --include_lib("deps/retest/include/retest.hrl"). -define(MODULES, [foo, @@ -51,9 +50,12 @@ "c/test4.proto", "c/d/test5.proto"]). +setup([Target]) -> + retest_utils:load_module(filename:join(Target, "inttest_utils.erl")), + ok. + files() -> [ - {copy, "../../rebar", "rebar"}, {copy, "rebar.config", "rebar.config"}, {copy, "rebar2.config", "rebar2.config"}, {copy, "rebar.bad.config", "rebar.bad.config"}, @@ -63,7 +65,7 @@ files() -> {copy, "proto.bad", "proto.bad"}, {copy, "mock", "deps"}, {create, "ebin/foo.app", app(foo, ?MODULES ++ ?GENERATED_MODULES)} - ]. + ] ++ inttest_utils:rebar_setup(). run(_Dir) -> % perform test obtaining the .proto files from src dir @@ -99,7 +101,7 @@ run_from_dir(success_expected, ProtoDir, ConfigFile) -> %% the .hrl file was generated before foo was compiled. ok = check_beams_generated(), - ?DEBUG("Verifying recompilation~n", []), + retest_log:log(debug, "Verifying recompilation~n", []), TestErl = hd(generated_erl_files()), TestProto = hd(source_proto_files(ProtoDir)), make_proto_newer_than_erl(TestProto, TestErl), @@ -111,7 +113,7 @@ run_from_dir(success_expected, ProtoDir, ConfigFile) -> TestMTime2 = read_mtime(TestErl), ?assert(TestMTime2 > TestMTime1), - ?DEBUG("Verifying recompilation with no changes~n", []), + retest_log:log(debug, "Verifying recompilation with no changes~n", []), TestMTime3 = read_mtime(TestErl), ?assertMatch({ok, _}, retest_sh:run("./rebar --config " ++ ConfigFile @@ -120,7 +122,7 @@ run_from_dir(success_expected, ProtoDir, ConfigFile) -> TestMTime4 = read_mtime(TestErl), ?assert(TestMTime3 =:= TestMTime4), - ?DEBUG("Verify cleanup~n", []), + retest_log:log(debug, "Verify cleanup~n", []), ?assertMatch({ok, _}, retest_sh:run("./rebar --config " ++ ConfigFile ++ " clean", |