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

« back to all changes in this revision

Viewing changes to lib/kernel/test/zlib_SUITE.erl

  • 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
1
%%
2
2
%% %CopyrightBegin%
3
3
%% 
4
 
%% Copyright Ericsson AB 2005-2009. All Rights Reserved.
 
4
%% Copyright Ericsson AB 2005-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
19
19
 
20
20
-module(zlib_SUITE).
21
21
 
22
 
-include("test_server.hrl").
 
22
-include_lib("test_server/include/test_server.hrl").
23
23
 
24
24
-compile(export_all).
25
25
 
48
48
init_per_testcase(_Func, Config) ->
49
49
    Dog = test_server:timetrap(test_server:seconds(60)),
50
50
    [{watchdog, Dog}|Config].
51
 
fin_per_testcase(_Func, Config) ->
 
51
end_per_testcase(_Func, Config) ->
52
52
    Dog = ?config(watchdog, Config),
53
53
    test_server:timetrap_cancel(Dog).
54
54
 
69
69
%%     end,
70
70
%%     log("<>ERROR<>~n" ++ Format, Args, File, Line).
71
71
 
72
 
all(suite) -> 
73
 
    [api, examples, func, smp, otp_7359].
74
 
 
75
 
api(doc) -> "Basic the api tests";
76
 
api(suite) ->
77
 
    [api_open_close,
78
 
     api_deflateInit,
79
 
     api_deflateSetDictionary,
80
 
     api_deflateReset,
81
 
     api_deflateParams,
82
 
     api_deflate,
83
 
     api_deflateEnd,
84
 
     api_inflateInit,
85
 
     api_inflateSetDictionary,
86
 
     api_inflateSync,
87
 
     api_inflateReset,
88
 
     api_inflate,
89
 
     api_inflateEnd,
90
 
     api_setBufsz,
91
 
     api_getBufsz,
92
 
     api_crc32,
93
 
     api_adler32,
94
 
     api_getQSize,
95
 
     api_un_compress,
96
 
     api_un_zip,
97
 
%     api_g_un_zip_file,
98
 
     api_g_un_zip].
 
72
suite() -> [{ct_hooks,[ts_install_cth]}].
 
73
 
 
74
all() -> 
 
75
    [{group, api}, {group, examples}, {group, func}, smp,
 
76
     otp_7359].
 
77
 
 
78
groups() -> 
 
79
    [{api, [],
 
80
      [api_open_close, api_deflateInit,
 
81
       api_deflateSetDictionary, api_deflateReset,
 
82
       api_deflateParams, api_deflate, api_deflateEnd,
 
83
       api_inflateInit, api_inflateSetDictionary,
 
84
       api_inflateSync, api_inflateReset, api_inflate,
 
85
       api_inflateEnd, api_setBufsz, api_getBufsz, api_crc32,
 
86
       api_adler32, api_getQSize, api_un_compress, api_un_zip,
 
87
       api_g_un_zip]},
 
88
     {examples, [], [intro]},
 
89
     {func, [],
 
90
      [zip_usage, gz_usage, gz_usage2, compress_usage,
 
91
       dictionary_usage, large_deflate, crc, adler]}].
 
92
 
 
93
init_per_suite(Config) ->
 
94
    Config.
 
95
 
 
96
end_per_suite(_Config) ->
 
97
    ok.
 
98
 
 
99
init_per_group(_GroupName, Config) ->
 
100
    Config.
 
101
 
 
102
end_per_group(_GroupName, Config) ->
 
103
    Config.
 
104
 
 
105
 
99
106
 
100
107
api_open_close(doc) -> "Test open/0 and close/1";
101
108
api_open_close(suite) -> [];
517
524
    %% zlib:zip(<<42>>), one byte changed.
518
525
    <<31,139,8,0,0,0,0,0,0,3,211,2,0,91,38,185,9,2,0,0,0>>.
519
526
 
520
 
examples(doc) ->  "Test the doc examples";
521
 
examples(suite) -> 
522
 
    [
523
 
     intro
524
 
    ].
525
527
 
526
528
intro(suite) -> [];
527
529
intro(doc) -> "";
551
553
    Orig = list_to_binary(lists:duplicate(5, D)),
552
554
    ?m(Orig, zlib:uncompress(Res)).
553
555
 
554
 
func(doc) ->  "Test the functionality";
555
 
func(suite) -> 
556
 
    [zip_usage, gz_usage, gz_usage2, compress_usage,
557
 
     dictionary_usage, 
558
 
     large_deflate, 
559
 
     %%     inflateSync,
560
 
     crc,
561
 
     adler
562
 
    ].
563
556
 
564
557
large_deflate(doc) -> "Test deflate large file, which had a bug reported on erlang-bugs";
565
558
large_deflate(suite) -> [];