anchor.diff:  help(outdir) ->
       "Output directory for compiled modules";
   help(dir) ->
  -    "List of directories containing test suites (default: test)";
  +    "List of additional directories containing test suites";
   help(suite) ->
       "List of test suites to run";
   help(group) ->
  
positive.code:     end,
      ensure_dir(Rest).
  
  test_opts(State, InDir, OutDir) ->
      ErlOpts = rebar_state:get(State, common_test_compile_opts, []) ++
                rebar_utils:erl_opts(State),
      TestOpts = [{outdir, OutDir}] ++
                 [{src_dirs, InDir}] ++
                 [{src_dirs, ["src", "test"]}] ++
                 ErlOpts,
      rebar_state:set(State, erl_opts, TestOpts).
  
  first_files(State) ->
      BaseFirst = rebar_state:get(State, erl_first_files, []),
      CTFirst = rebar_state:get(State, common_test_first_files, []),
      rebar_state:set(State, erl_first_modules, BaseFirst ++ CTFirst).
  
  resolve_ct_opts(State, Opts) ->
      CTOpts = rebar_state:get(State, common_test_opts, []),
      %% rebar has seperate input and output directories whereas `common_test`
      %% uses only a single directory so handle `dir` elsewhere
      CmdLineOpts = lists:keydelete(dir, 1, Opts),
      lists:ukeymerge(1, lists:ukeysort(1, CmdLineOpts), lists:ukeysort(1, CTOpts)).
  
  handle_results([Result]) ->
      handle_results(Result);
  
negative.code: do(State) ->
      ?INFO("Running Common Test suites...", []),
      {RawOpts, _} = rebar_state:command_parsed_args(State),
      {InDirs, OutDir} = split_ct_dirs(State, RawOpts),
      Opts = transform_opts(RawOpts),
      ProjectApps = rebar_state:project_apps(State),
      ok = create_dirs(Opts),
      ?DEBUG("Compiling Common Test suites in: ~p", [OutDir]),
      lists:foreach(fun(App) ->
  