~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to lib/asn1/test/asn1_common_SUITE.erl.src

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%%
 
2
%% %CopyrightBegin%
 
3
%% 
 
4
%% Copyright Ericsson AB 2005-2011. All Rights Reserved.
 
5
%% 
 
6
%% The contents of this file are subject to the Erlang Public License,
 
7
%% Version 1.1, (the "License"); you may not use this file except in
 
8
%% compliance with the License. You should have received a copy of the
 
9
%% Erlang Public License along with this software. If not, it can be
 
10
%% retrieved online at http://www.erlang.org/.
 
11
%% 
 
12
%% Software distributed under the License is distributed on an "AS IS"
 
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
14
%% the License for the specific language governing rights and limitations
 
15
%% under the License.
 
16
%% 
 
17
%% %CopyrightEnd%
 
18
%%
 
19
%%
 
20
 
 
21
common() -> [app_test, appup_test,testTimer_ber,testTimer_ber_bin,
 
22
        testTimer_ber_bin_opt, testTimer_ber_bin_opt_driver, testTimer_per,
 
23
        testTimer_per_bin, testTimer_per_bin_opt, testTimer_uper_bin,
 
24
        testComment,testName2Number].
 
25
 
 
26
 
 
27
app_test(suite) -> [{asn1_app_test,all}].
 
28
appup_test(suite) -> [{asn1_appup_test,all}].
 
29
 
 
30
testTimer_ber(suite) -> [];
 
31
testTimer_ber(Config) ->
 
32
    ?line testTimer:compile(Config,ber,[]),
 
33
    ?line testTimer:go(Config,ber).
 
34
 
 
35
testTimer_ber_bin(suite) -> [];
 
36
testTimer_ber_bin(Config) ->
 
37
    ?line testTimer:compile(Config,ber_bin,[]),
 
38
    ?line testTimer:go(Config,ber_bin).
 
39
 
 
40
testTimer_ber_bin_opt(suite) -> [];
 
41
testTimer_ber_bin_opt(Config) ->
 
42
    ?line testTimer:compile(Config,ber_bin,[optimize]),
 
43
    ?line testTimer:go(Config,ber_bin).
 
44
 
 
45
testTimer_ber_bin_opt_driver(suite) -> [];
 
46
testTimer_ber_bin_opt_driver(Config) ->
 
47
    ?line testTimer:compile(Config,ber_bin,[optimize,driver]),
 
48
    ?line testTimer:go(Config,ber_bin).
 
49
 
 
50
testTimer_per(suite) -> [];
 
51
testTimer_per(Config) ->
 
52
    ?line testTimer:compile(Config,per,[]),
 
53
    ?line testTimer:go(Config,per).
 
54
 
 
55
testTimer_per_bin(suite) -> [];
 
56
testTimer_per_bin(Config) ->
 
57
    ?line testTimer:compile(Config,per_bin,[]),
 
58
    ?line testTimer:go(Config,per_bin).
 
59
 
 
60
testTimer_per_bin_opt(suite) -> [];
 
61
testTimer_per_bin_opt(Config) ->
 
62
    ?line testTimer:compile(Config,per_bin,[optimize]),
 
63
    ?line testTimer:go(Config,per_bin).
 
64
 
 
65
 
 
66
testTimer_uper_bin(suite) -> [];
 
67
testTimer_uper_bin(Config) ->
 
68
    ?line ok=testTimer:compile(Config,uper_bin,[]),
 
69
    ?line {comment,_} = testTimer:go(Config,uper_bin).
 
70
 
 
71
%% Test of multiple-line comment, OTP-8043
 
72
testComment(suite) -> [];
 
73
testComment(Config) ->
 
74
    ?line DataDir = ?config(data_dir,Config),
 
75
    ?line OutDir = ?config(priv_dir,Config),
 
76
 
 
77
    ?line ok = asn1ct:compile(DataDir ++ "Comment",[{outdir,OutDir}]),
 
78
 
 
79
    ?line {ok,Enc} = asn1_wrapper:encode('Comment','Seq',{'Seq',12,true}),
 
80
    ?line {ok,{'Seq',12,true}} = asn1_wrapper:decode('Comment','Seq',Enc),
 
81
    ok.
 
82
 
 
83
testName2Number(suite) -> [];
 
84
testName2Number(Config) -> 
 
85
    DataDir = ?config(data_dir,Config),
 
86
    OutDir = ?config(priv_dir,Config),
 
87
    N2NOptions = [{n2n,Type}|| Type <- 
 
88
                                   ['CauseMisc','CauseProtocol',
 
89
                                    %% 'CauseNetwork',
 
90
                                    'CauseRadioNetwork',
 
91
                                    'CauseTransport','CauseNas']],
 
92
    ?line ok = asn1ct:compile(DataDir ++ "S1AP-IEs",[{outdir,OutDir}]++N2NOptions),
 
93
    ?line true = code:add_patha(OutDir),
 
94
 
 
95
    ?line 0 = 'S1AP-IEs':name2num_CauseMisc('control-processing-overload'),
 
96
    ?line 'unknown-PLMN' = 'S1AP-IEs':num2name_CauseMisc(5),
 
97
    ok.
 
98