From 5dc2de6468be98480be50848bd9ba563c69a84f2 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Wed, 17 Sep 2014 17:32:04 -0500 Subject: update common tests --- .travis.yml | 4 ---- Makefile | 2 +- src/rebar3.erl | 9 +++++++-- test/rebar_compile_SUITE.erl | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 602266b..88741ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,6 @@ language: erlang otp_release: - R16B02 - R16B01 - - R16B - R15B01 - - R15B - - R14B04 - - R14B03 - 17.0 script: "make travis" diff --git a/Makefile b/Makefile index 7d84d15..d4321fa 100644 --- a/Makefile +++ b/Makefile @@ -42,4 +42,4 @@ test: @$(REBAR) eunit @$(RETEST) -v inttest -travis: clean debug xref clean all deps test +travis: all deps test diff --git a/src/rebar3.erl b/src/rebar3.erl index af4f3a7..d0a6baa 100644 --- a/src/rebar3.erl +++ b/src/rebar3.erl @@ -156,8 +156,13 @@ init_config({Options, _NonOptArgs}) -> init_config1(BaseConfig) -> %% Determine the location of the rebar executable; important for pulling %% resources out of the escript - ScriptName = filename:absname(escript:script_name()), - rebar_state:set(BaseConfig, escript, ScriptName). + try + ScriptName = filename:absname(escript:script_name()), + rebar_state:set(BaseConfig, escript, ScriptName) + catch + _:_ -> + BaseConfig + end. run_aux(BaseConfig, Commands) -> %% Make sure crypto is running diff --git a/test/rebar_compile_SUITE.erl b/test/rebar_compile_SUITE.erl index db8e9cb..8efdc99 100644 --- a/test/rebar_compile_SUITE.erl +++ b/test/rebar_compile_SUITE.erl @@ -25,7 +25,7 @@ init_per_testcase(_, Config) -> DataDir = proplists:get_value(data_dir, Config), AppsDir = filename:join([DataDir, create_random_name("apps_dir1_")]), ok = ec_file:mkdir_p(AppsDir), - Verbosity = rebar:log_level([]), + Verbosity = rebar3:log_level([]), rebar_log:init(command_line, Verbosity), State = rebar_state:new(), [{apps, AppsDir}, {state, State} | Config]. @@ -43,7 +43,7 @@ build_basic_app(Config) -> ConfigFile = filename:join([AppDir, "rebar.config"]), write_config(ConfigFile, []), - rebar:run(rebar_state:new(State, [], AppDir), ["compile"]), + rebar3:run(rebar_state:new(State, [], AppDir), ["compile"]), %% Verify app was built [App] = rebar_app_discover:find_apps([AppDir]), -- cgit v1.1