anchor.diff:       riak_core, riak_pipe, riak_kv, DefaultSetupFun, Extra].
   
   
  +%% @doc Runs the application-lifecycle phase across all of the given
  +%% applications and functions.
  +%% @see dep_apps/2
  +-spec do_dep_apps(load | start | stop, [ atom() | fun() ]) -> [ any() ].
   do_dep_apps(StartStop, Apps) ->
  -    lists:map(fun(A) when is_atom(A) -> application:StartStop(A);
  +    lists:map(fun(A) when is_atom(A) ->
  +                      case include_app_phase(StartStop, A) of
  +                          true -> application:StartStop(A);
  +                          _ -> ok
  +                      end;
                    (F)                 -> F(StartStop)
                 end, Apps).
   
  +%% @doc Determines whether a given application should be modified in
  +%% the given phase. If this returns false, the application will not be
  +%% loaded, started, or stopped by `do_dep_apps/2'.
  +-spec include_app_phase(Phase::load | start | stop, Application::atom()) -> true | false.
  +include_app_phase(stop, crypto) -> false;
  +include_app_phase(start, folsom) -> false;
  +include_app_phase(_Phase, _App) -> true.
  +
  +
   -endif. % TEST
  
positive.code:     exit(Pid, shutdown),
      ok = wait_for_pid(Pid).
  
  %% Wait for a pid to exit
  wait_for_pid(Pid) ->
      Mref = erlang:monitor(process, Pid),
      receive
  
negative.code:             ok
      end.
  
  %% @doc Performs generic, riak_kv-specific and test-specific setup
  %% when used within a test fixture. This includes cleaning up any
  %% leaky state from previous tests (internally calling `cleanup/3'),
  %% loading dependent applications, starting distributed Erlang,
  %% starting dependent applications, and waiting for riak_kv to become
  %% available.
  %%
  %% The given `SetupFun' will be called first with the argument `stop'
  %% before other applications are stopped (to cleanup leaky test
  %% state), `load' after all other applications are loaded, and then
  %% `start' after all other applications are started. It is generally
  %% good practice to use the same function in the `SetupFun' as the
  %% `CleanupFun' given to `cleanup/3'.
  %%
  %% @see common_setup/2, dep_apps/2, do_dep_apps/2
  -spec setup(TestName::string(), fun((load|start|stop) -> any()) -> ok.
  setup(TestName, SetupFun) ->
      %% Cleanup in case a previous test did not
      cleanup(TestName, SetupFun, setup),
  