From 80f5bc61526f50e2fe3d4642faea6abff43cbd96 Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Mon, 2 Nov 2015 07:06:06 -0800 Subject: add warning about `auto_compile` --- src/rebar_prv_common_test.erl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl index 7af2819..7a088e5 100644 --- a/src/rebar_prv_common_test.erl +++ b/src/rebar_prv_common_test.erl @@ -74,12 +74,13 @@ do(State, Tests) -> run_tests(State, Opts) -> T = translate_paths(State, Opts), Opts1 = setup_logdir(State, T), - ?DEBUG("ct_opts ~p", [Opts1]), + Opts2 = turn_off_auto_compile(Opts1), + ?DEBUG("ct_opts ~p", [Opts2]), {RawOpts, _} = rebar_state:command_parsed_args(State), ok = maybe_write_coverdata(State), case proplists:get_value(verbose, RawOpts, false) of - true -> run_test_verbose(Opts1); - false -> run_test_quiet(Opts1) + true -> run_test_verbose(Opts2); + false -> run_test_quiet(Opts2) end. -spec format_error(any()) -> iolist(). @@ -155,6 +156,9 @@ cfgopts(State) -> filter_opts({test_spec, _}) -> ?WARN("Test specs not supported", []), false; +filter_opts({auto_compile, _}) -> + ?WARN("Auto compile not supported", []), + false; filter_opts({suite, Suite}) when is_integer(hd(Suite)) -> true; filter_opts({suite, Suite}) when is_atom(Suite) -> {true, {suite, atom_to_list(Suite)}}; @@ -373,6 +377,9 @@ setup_logdir(State, Opts) -> filelib:ensure_dir(filename:join([Logdir, "dummy.beam"])), [{logdir, Logdir}|lists:keydelete(logdir, 1, Opts)]. +turn_off_auto_compile(Opts) -> + [{auto_compile, false}|lists:keydelete(auto_compile, 1, Opts)]. + run_test_verbose(Opts) -> handle_results(ct:run_test(Opts)). run_test_quiet(Opts) -> -- cgit v1.1