From 7427b5f03eecc06ef797eb8f259b75482b2c0808 Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Sat, 30 Jan 2016 18:58:18 -0800 Subject: fix paths for multiple app projects when running ct with no --dir argument --- test/rebar_ct_SUITE.erl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/rebar_ct_SUITE.erl b/test/rebar_ct_SUITE.erl index 183a1d0..94ab690 100644 --- a/test/rebar_ct_SUITE.erl +++ b/test/rebar_ct_SUITE.erl @@ -681,25 +681,26 @@ suite_at_app_root(Config) -> Opts = rebar_prv_common_test:translate_paths(NewState, T), Suite = proplists:get_value(suite, Opts), - Expected = filename:join([AppDir, "_build", "test", "extras", "apps", Name2, "app_root_SUITE"]), + Expected = filename:join([AppDir, "_build", "test", "lib", Name2, "app_root_SUITE"]), [Expected] = Suite, - TestHrl = filename:join([AppDir, "_build", "test", "extras", "apps", Name2, "app_root_SUITE.hrl"]), + TestHrl = filename:join([AppDir, "_build", "test", "lib", Name2, "app_root_SUITE.hrl"]), true = filelib:is_file(TestHrl), - TestBeam = filename:join([AppDir, "_build", "test", "extras", "apps", Name2, "app_root_SUITE.beam"]), + TestBeam = filename:join([AppDir, "_build", "test", "lib", Name2, "app_root_SUITE.beam"]), true = filelib:is_file(TestBeam), - DataDir = filename:join([AppDir, "_build", "test", "extras", "apps", Name2, "app_root_SUITE_data"]), + DataDir = filename:join([AppDir, "_build", "test", "lib", Name2, "app_root_SUITE_data"]), true = filelib:is_dir(DataDir), - DataFile = filename:join([AppDir, "_build", "test", "extras", "root_SUITE_data", "some_data.txt"]), + DataFile = filename:join([AppDir, "_build", "test", "lib", Name2, "app_root_SUITE_data", "some_data.txt"]), true = filelib:is_file(DataFile). %% this test probably only fails when this suite is run via rebar3 with the --cover flag data_dir_correct(Config) -> DataDir = ?config(data_dir, Config), Parts = filename:split(DataDir), + ct:pal(Parts), ["rebar_ct_SUITE_data","test","rebar","lib","test","_build"|_] = lists:reverse(Parts). cmd_label(Config) -> -- cgit v1.1