anchor.diff:  format_error({failures_running_tests, FailedCount}) ->
       io_lib:format("Failures occured running tests: ~p", [FailedCount]);
   format_error({error_running_tests, Reason}) ->
  -    io_lib:format("Error running tests: ~p", [Reason]).
  +    io_lib:format("Error running tests: ~p", [Reason]);
  +format_error({error_processing_options, Reason}) ->
  +    io_lib:format("Error processing options: ~p", [Reason]).
   
   run_test(CTOpts, true) ->
       handle_results(ct:run_test(CTOpts));
  
positive.code:     ok = create_dirs(Opts),
      InDirs = in_dirs(State, RawOpts),
      ok = compile_tests(State, TestApps, InDirs),
      ok = maybe_cover_compile(State, RawOpts),
      CTOpts = resolve_ct_opts(State, Opts),
      Verbose = proplists:get_value(verbose, RawOpts, false),
      TestDirs = test_dirs(State, TestApps),
      Result = run_test([{dir, TestDirs}|CTOpts], Verbose),
      ok = rebar_prv_cover:maybe_write_coverdata(State, ?PROVIDER),
      case Result of
          {error, Reason} ->
  
negative.code:     CTFirst = rebar_state:get(State, ct_first_files, []),
      {erl_first_files, CTFirst}.
  
  resolve_ct_opts(State, TestApps, CmdLineOpts) ->
      CTOpts = rebar_state:get(State, ct_opts, []),
      Opts = lists:ukeymerge(1,
                      lists:ukeysort(1, CmdLineOpts),
                      lists:ukeysort(1, CTOpts)),
      TestDirs = test_dirs(State, TestApps),
      try resolve_ct_opts(TestDirs, Opts) of
          Opts2 ->
              %% disable `auto_compile`
              {ok, [{auto_compile, false} | Opts2]}
      catch
          throw:{error, Reason}->
              {error, {error_processing_options, Reason}}
      end.
  
  resolve_ct_opts(Dirs, Opts) ->
      Opts2 = lists:keydelete(dir, 1, Opts),
      case lists:keytake(suite, 1, Opts2) of
          {value, {suite, Suites}, Opts3} ->
              %% Find full path to suites so that test names are consistent with
              %% names when testing all dirs.
              Suites2 = [resolve_suite(Dirs, Suite) || Suite <- Suites],
              [{suite, Suites2} | Opts3];
          false ->
              %% No suites, test all dirs.
              [{dir, Dirs} | Opts2]
      end.
  
  resolve_suite(Dirs, Suite) ->
      File = Suite ++ code:objfile_extension(),
      case [Path || Dir <- Dirs,
                    Path <- [filename:join(Dir, File)],
                    filelib:is_file(Path)] of
          [Suite2] ->
              Suite2;
          [] ->
              throw({error, {unknown_suite, File}});
          Suites ->
              throw({error, {duplicate_suites, Suites}})
      end.
  
  compile_tests(State, TestApps, InDirs) ->
      F = fun(AppInfo) ->
  