anchor.diff:  			 [AppName]),
               ok;
           false ->
  -            prepare_for_tests(BuildRef, AppName, Modules)
  +            prepare_for_tests(BuildAll, BuildRef, AppName, Modules)
       end,
  -    test_apps(BuildRef, T, [Modules | Acc]);
  -test_apps(_, [], Modules) ->
  +    test_apps(BuildAll, BuildRef, T, [Modules | Acc]);
  +test_apps(_, _, [], Modules) ->
       Modules.
   
   %% @doc Prepare for running the tests. This mostly means seting up the
   %% coverage tools.
  --spec prepare_for_tests(sin_config:config(), string(), [atom()]) -> ok.
  -prepare_for_tests(BuildRef, AppName, AllModules) ->
  +-spec prepare_for_tests(all | changed,
  +			sin_config:config(), string(), [atom()]) -> ok.
  +prepare_for_tests(BuildAll, BuildRef, AppName, AllModules) ->
       BuildDir = sin_config:get_value(BuildRef, "build.dir"),
       DocDir = filename:join([BuildDir, "docs", "coverage", AppName]),
       filelib:ensure_dir(filename:join([DocDir, "tmp"])),
  
positive.code:                                      atom_to_list(App)
                               end, sin_config:get_value(BuildRef,
                                                    "project.apps")),
  	    test_apps(BuildRef, Apps, []),
  	    print_overall_percentage(BuildRef, Apps)
      end,
      BuildRef.
  
negative.code: %%% Internal functions
  %%====================================================================
  
  %% @doc if the command line has an 'all' prespective run all tests instead of
  %% just those that changed
  -spec build_all(sin_config:config()) ->
      all | changed.
  build_all(BuildRef) ->
      case sin_config:get_value(BuildRef, "command_line.arg") of
  	"all" ->
  	    all;
  	_ ->
  	    changed
      end.
  
  %% @doc Run tests for all the applications specified.
  %% @private
  -spec test_apps(all | changed,
  		sin_config:config(), [string()], [[atom()]]) -> ok.
  test_apps(BuildAll, BuildRef, [AppName | T], Acc) ->
      io:format("testing app ~s~n", [AppName]),
      Modules = sin_config:get_value(BuildRef,
                                "apps." ++ AppName ++ ".file_list"),
  