~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/common_test/src/ct_run.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090215164252-q5x4rcf8a5pbesb1
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%%<copyright>
2
 
%% <year>2004-2007</year>
 
2
%% <year>2004-2008</year>
3
3
%% <holder>Ericsson AB, All Rights Reserved</holder>
4
4
%%</copyright>
5
5
%%<legalnotice>
39
39
 
40
40
 
41
41
%% Misc internal functions
42
 
-export([variables_file_name/1, script_start1/2, run_test1/1]).
 
42
-export([variables_file_name/1,script_start1/2,run_test1/1]).
43
43
 
44
44
-include("ct_event.hrl").
45
45
-include("ct_util.hrl").
71
71
                Pid = spawn_link(fun() -> script_start1(Self,Args) end),
72
72
                receive 
73
73
                    {'EXIT',Pid,Reason} ->
74
 
                        io:format("Test run crashed! This could be an internal error "
75
 
                                  "- please report!\n\n"
76
 
                                  "~p\n\n",[Reason]),
77
 
                        {error,Reason};
 
74
                        case Reason of
 
75
                            {user_error,What} ->
 
76
                                io:format("\nTest run failed!\nReason: ~p\n\n",[What]),
 
77
                                {error,What};
 
78
                            _ ->
 
79
                                io:format("Test run crashed! This could be an internal error "
 
80
                                          "- please report!\n\n"
 
81
                                          "~p\n\n",[Reason]),
 
82
                                {error,Reason}                          
 
83
                        end;
78
84
                    {Pid,{error,Reason}} ->
79
85
                        io:format("\nTest run failed!\nReason: ~p\n\n",[Reason]),
80
86
                        {error,Reason};
273
279
                    script_start4(VtsOrShell,ConfigFiles,EvHandlers,
274
280
                                  [],Cover,Args,LogDir);
275
281
                false ->
276
 
                    script_usage()
 
282
                    script_usage(),
 
283
                    {error,incorrect_usage}
277
284
            end
278
285
    end.
279
286
 
1426
1433
                 ct_util,
1427
1434
                 ct_event,           
1428
1435
                 ct_master_logs,
1429
 
                 rx,
1430
1436
                 ct_framework,
1431
1437
                 teln,
1432
1438
                 ct_ftp,