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

« back to all changes in this revision

Viewing changes to lib/stdlib/test/tar_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
 
%% 
4
 
%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
5
 
%% 
 
3
%%
 
4
%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
 
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
8
8
%% compliance with the License. You should have received a copy of the
9
9
%% Erlang Public License along with this software. If not, it can be
10
10
%% retrieved online at http://www.erlang.org/.
11
 
%% 
 
11
%%
12
12
%% Software distributed under the License is distributed on an "AS IS"
13
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
14
%% the License for the specific language governing rights and limitations
15
15
%% under the License.
16
 
%% 
 
16
%%
17
17
%% %CopyrightEnd%
18
18
%%
19
19
-module(tar_SUITE).
20
20
 
21
 
-export([all/1, borderline/1, atomic/1, long_names/1,
 
21
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, 
 
22
         init_per_group/2,end_per_group/2, borderline/1, atomic/1, long_names/1,
22
23
         create_long_names/1, bad_tar/1, errors/1, extract_from_binary/1,
23
24
         extract_from_binary_compressed/1,
24
25
         extract_from_open_file/1, symlinks/1, open_add_close/1, cooked_compressed/1,
25
26
         memory/1]).
26
27
 
27
 
-include("test_server.hrl").
 
28
-include_lib("test_server/include/test_server.hrl").
28
29
-include_lib("kernel/include/file.hrl").
29
30
 
30
 
all(suite) -> [borderline, atomic, long_names, create_long_names,
31
 
               bad_tar, errors,
32
 
               extract_from_binary, extract_from_binary_compressed,
33
 
               extract_from_open_file,
34
 
               symlinks, open_add_close, cooked_compressed,
35
 
               memory].
 
31
suite() -> [{ct_hooks,[ts_install_cth]}].
 
32
 
 
33
all() -> 
 
34
    [borderline, atomic, long_names, create_long_names,
 
35
     bad_tar, errors, extract_from_binary,
 
36
     extract_from_binary_compressed, extract_from_open_file,
 
37
     symlinks, open_add_close, cooked_compressed, memory].
 
38
 
 
39
groups() -> 
 
40
    [].
 
41
 
 
42
init_per_suite(Config) ->
 
43
    Config.
 
44
 
 
45
end_per_suite(_Config) ->
 
46
    ok.
 
47
 
 
48
init_per_group(_GroupName, Config) ->
 
49
    Config.
 
50
 
 
51
end_per_group(_GroupName, Config) ->
 
52
    Config.
 
53
 
36
54
 
37
55
borderline(doc) ->
38
56
    ["Test creating, listing and extracting one file from an archive",
183
201
     "and uncompressed archives."
184
202
     "Also test the 'cooked' option."];
185
203
atomic(suite) -> [];
186
 
atomic(Config) when list(Config) ->
 
204
atomic(Config) when is_list(Config) ->
187
205
    ?line ok = file:set_cwd(?config(priv_dir, Config)),
188
206
    ?line DataFiles = data_files(),
189
207
    ?line Names = [Name || {Name,_,_} <- DataFiles],
369
387
            case catch erl_tar:format_error(Reason) of
370
388
                {'EXIT', CrashReason} ->
371
389
                    test_server:fail({format_error, crashed, CrashReason});
372
 
                String when list(String) ->
 
390
                String when is_list(String) ->
373
391
                    io:format("format_error(~p) -> ~s", [Reason, String]);
374
392
                Other ->
375
393
                    test_server:fail({format_error, returned, Other})
413
431
            case catch erl_tar:format_error(Error) of
414
432
                {'EXIT', FReason} ->
415
433
                    test_server:fail({format_error, crashed, FReason});
416
 
                String when list(String) ->
 
434
                String when is_list(String) ->
417
435
                    io:format("format_error(~p) -> ~s", [Error, String]);
418
436
                Other ->
419
437
                    test_server:fail({format_error, returned, Other})
431
449
 
432
450
extract_from_binary(doc) ->
433
451
    "Test extracting a tar archive from a binary.";
434
 
extract_from_binary(Config) when list(Config) ->
 
452
extract_from_binary(Config) when is_list(Config) ->
435
453
    ?line DataDir = ?config(data_dir, Config),
436
454
    ?line PrivDir = ?config(priv_dir, Config),
437
455
    ?line Long = filename:join(DataDir, "no_fancy_stuff.tar"),