anchor.diff:      ExitStatus = rpc:call(CTNode, ct_run, script_start, []),
       test_server:format(Level, "[RUN #2] Got exit status value ~p~n",
   		       [ExitStatus]),
  -    case {CtRunTestResult,ExitStatus} of
  -	{{_Ok,Failed,{_UserSkipped,_AutoSkipped}},1} when Failed > 0 ->
  -	    ok;
  -	{{_Ok,0,{_UserSkipped,AutoSkipped}},ExitStatus} when AutoSkipped > 0 ->
  -	    case proplists:get_value(exit_status, Opts1) of
  -		ignore_config when ExitStatus == 1 ->
  -		    {error,{wrong_exit_status,ExitStatus}};
  -		_ ->
  -		    ok
  -	    end;
  -	{{error,_}=Error,ExitStatus} ->
  -	    if ExitStatus /= 2 ->
  -		    {error,{wrong_exit_status,ExitStatus}};
  -	       ExitStatus == 2 ->
  -		    Error
  -	    end;
  -	{{_Ok,0,{_UserSkipped,_AutoSkipped}},0} ->
  -	    ok;
  -	Unexpected ->
  -	    {error,{unexpected_return_value,Unexpected}}
  -    end.
  +    ExitStatus.
  +
  +check_result({_Ok,Failed,{_UserSkipped,_AutoSkipped}},1,_Opts)
  +  when Failed > 0 ->
  +    ok;
  +check_result({_Ok,0,{_UserSkipped,AutoSkipped}},ExitStatus,Opts)
  +  when AutoSkipped > 0 ->
  +    case proplists:get_value(exit_status, Opts) of
  +	ignore_config when ExitStatus == 1 ->
  +	    {error,{wrong_exit_status,ExitStatus}};
  +	_ ->
  +	    ok
  +    end;
  +check_result({error,_}=Error,2,_Opts) ->
  +    Error;
  +check_result({error,_},ExitStatus,_Opts) ->
  +    {error,{wrong_exit_status,ExitStatus}};
  +check_result({_Ok,0,{_UserSkipped,_AutoSkipped}},0,_Opts) ->
  +    ok;
  +check_result(CtRunTestResult,ExitStatus,Opts)
  +  when is_list(CtRunTestResult) -> % repeated testruns
  +    try check_result(sum_testruns(CtRunTestResult,0,0,0,0),ExitStatus,Opts)
  +    catch _:_ ->
  +	    {error,{unexpected_return_value,{CtRunTestResult,ExitStatus}}}
  +    end;
  +check_result(CtRunTestResult,ExitStatus,_Opts) ->
  +    {error,{unexpected_return_value,{CtRunTestResult,ExitStatus}}}.
  +
  +sum_testruns([{O,F,{US,AS}}|T],Ok,Failed,UserSkipped,AutoSkipped) ->
  +    sum_testruns(T,Ok+O,Failed+F,UserSkipped+US,AutoSkipped+AS);
  +sum_testruns([],Ok,Failed,UserSkipped,AutoSkipped) ->
  +    {Ok,Failed,{UserSkipped,AutoSkipped}}.
   
   run(M, F, A, Config) ->
       run({M,F,A}, [], Config).
  
positive.code: %%%-----------------------------------------------------------------
  %%% 
  run(Opts, Config) when is_list(Opts) ->
      CTNode = proplists:get_value(ct_node, Config),
      Level = proplists:get_value(trace_level, Config),
      %% use ct interface
      test_server:format(Level, "~n[RUN #1] Calling ct:run_test(~p) on ~p~n",
  		       [Opts, CTNode]),
      CtRunTestResult = rpc:call(CTNode, ct, run_test, [Opts]),
  
negative.code: 	    timer:sleep(5000),
  	    undefined = rpc:call(CTNode, erlang, whereis, [ct_util_server])
      end,
      CtRunTestResult.
  
  run_ct_script_start(Opts, Config) ->
      CTNode = proplists:get_value(ct_node, Config),
      Level = proplists:get_value(trace_level, Config),
      Opts1 = [{halt_with,{?MODULE,ct_test_halt}} | Opts],
      test_server:format(Level, "Saving start opts on ~p: ~p~n",
  		       [CTNode, Opts1]),
  