diff options
author | Tristan Sloughter <t@crashfast.com> | 2014-09-17 17:32:04 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2014-09-17 17:32:04 -0500 |
commit | 5dc2de6468be98480be50848bd9ba563c69a84f2 (patch) | |
tree | 6288bf05f793acef7a6d36e3f7c87dccd6921d34 | |
parent | 48769e75c224ccd8e04df250b86b50540270ce9a (diff) |
update common tests
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/rebar3.erl | 9 | ||||
-rw-r--r-- | 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" @@ -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]), |