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

« back to all changes in this revision

Viewing changes to lib/compiler/test/test_lib.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 2003-2010. All Rights Reserved.
 
4
%% Copyright Ericsson AB 2003-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
41
41
    smoke_disasm(code:which(Mod));
42
42
smoke_disasm(File) when is_list(File) ->
43
43
    Res = beam_disasm:file(File),
44
 
    {beam_file,Mod} = {element(1, Res),element(2, Res)}.
 
44
    {beam_file,_Mod} = {element(1, Res),element(2, Res)}.
45
45
 
46
46
%% Retrieve the "interesting" compiler options (options for optimization
47
47
%% and compatibility) for the given module.
62
62
                    (_) -> false
63
63
                 end, Opts).
64
64
 
65
 
%% Some test suites gets cloned (e.g. to "record_SUITE" to "record_no_opt_SUITE"),
66
 
%% but the data directory is not cloned. This function retrieves the path to
67
 
%% the original data directory.
 
65
%% Some test suites gets cloned (e.g. to "record_SUITE" to
 
66
%% "record_no_opt_SUITE"), but the data directory is not cloned.
 
67
%% This function retrieves the path to the original data directory.
68
68
 
69
69
get_data_dir(Config) ->
70
70
    Data0 = ?config(data_dir, Config),
71
 
    {ok,Data1,_} = regexp:sub(Data0, "_no_opt_SUITE", "_SUITE"),
72
 
    {ok,Data2,_} = regexp:sub(Data1, "_post_opt_SUITE", "_SUITE"),
73
 
    {ok,Data,_} = regexp:sub(Data2, "_inline_SUITE", "_SUITE"),
74
 
    Data.
 
71
    Opts = [{return,list}],
 
72
    Data1 = re:replace(Data0, "_no_opt_SUITE", "_SUITE", Opts),
 
73
    Data = re:replace(Data1, "_post_opt_SUITE", "_SUITE", Opts),
 
74
    re:replace(Data, "_inline_SUITE", "_SUITE", Opts).
75
75
 
76
76
%% p_run(fun(Data) -> ok|error, List) -> ok
77
77
%%  Will fail the test case if there were any errors.