~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to erts/test/z_SUITE.erl

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%%
2
2
%% %CopyrightBegin%
3
3
%%
4
 
%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
 
4
%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
5
5
%%
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
35
35
 
36
36
-define(DEFAULT_TIMEOUT, ?t:minutes(5)).
37
37
 
38
 
-export([all/1, init_per_testcase/2, fin_per_testcase/2]).
 
38
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, 
 
39
         init_per_group/2,end_per_group/2, 
 
40
         init_per_testcase/2, end_per_testcase/2]).
39
41
 
40
42
-export([search_for_core_files/1, core_files/1]).
41
43
 
42
 
-include_lib("test_server/include/test_server.hrl").
 
44
-include_lib("common_test/include/ct.hrl").
43
45
    
44
46
 
45
47
init_per_testcase(Case, Config) ->
46
48
    Dog = ?t:timetrap(?DEFAULT_TIMEOUT),
47
49
    [{testcase, Case}, {watchdog, Dog} |Config].
48
50
 
49
 
fin_per_testcase(_Case, Config) ->
 
51
end_per_testcase(_Case, Config) ->
50
52
    Dog = ?config(watchdog, Config),
51
53
    ?t:timetrap_cancel(Dog),
52
54
    ok.
53
55
 
54
 
all(doc) -> [];
55
 
all(suite) ->
 
56
suite() -> [{ct_hooks,[ts_install_cth]}].
 
57
 
 
58
all() -> 
56
59
    [core_files].
57
60
 
 
61
groups() -> 
 
62
    [].
 
63
 
 
64
init_per_suite(Config) ->
 
65
    Config.
 
66
 
 
67
end_per_suite(_Config) ->
 
68
    ok.
 
69
 
 
70
init_per_group(_GroupName, Config) ->
 
71
    Config.
 
72
 
 
73
end_per_group(_GroupName, Config) ->
 
74
    Config.
 
75
 
 
76
 
58
77
 
59
78
core_files(doc) ->
60
79
    [];
147
166
 
148
167
file_inspect(#core_search_conf{file = File}, Core) ->
149
168
    FRes0 = os:cmd(File ++ " " ++ Core),
150
 
    FRes = case regexp:match(FRes0, Core) of
151
 
               {match, S, E} ->
 
169
    FRes = case string:str(FRes0, Core) of
 
170
               0 ->
 
171
                   FRes0;
 
172
               S ->
152
173
                   L = length(FRes0),
 
174
                   E = length(Core),
153
175
                   case S of
154
176
                       1 ->
155
177
                           lists:sublist(FRes0, E+1, L+1);
159
181
                               " "
160
182
                               ++
161
183
                               lists:sublist(FRes0, E+1, L+1)
162
 
                   end;
163
 
               _ -> FRes0
 
184
                   end
164
185
           end,
165
 
    case regexp:match(FRes, "[Tt][Ee][Xx][Tt]") of
 
186
    case re:run(FRes, "text|ascii", [caseless,{capture,none}]) of
 
187
        match ->
 
188
            not_a_core;
166
189
        nomatch ->
167
 
            case regexp:match(FRes, "[Aa][Ss][Cc][Ii][Ii]") of
168
 
                nomatch ->
169
 
                    probably_a_core;
170
 
                _ ->
171
 
                    not_a_core
172
 
            end;
173
 
        _ ->
174
 
            not_a_core
 
190
            probably_a_core
175
191
    end.
176
192
 
177
193
mk_readable(F) ->