1: %% 2: %% %CopyrightBegin% 3: %% 4: %% Copyright Ericsson AB 1998-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: %%% Purpose : Test suite for the backends of the IDL compiler 22: %%%---------------------------------------------------------------------- 23: 24: -module(ic_be_SUITE). 25: -include_lib("test_server/include/test_server.hrl"). 26: 27: 28: -export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, 29: init_per_group/2,end_per_group/2,plain/1]). 30: 31: 32: -define(OUT(X), filename:join([?config(priv_dir, Config), gen, to_list(X)])). 33: 34: 35: %% Top of cases 36: 37: suite() -> [{ct_hooks,[ts_install_cth]}]. 38: 39: all() -> 40: [plain]. 41: 42: groups() -> 43: []. 44: 45: init_per_suite(Config) -> 46: Config. 47: 48: end_per_suite(_Config) -> 49: ok. 50: 51: init_per_group(_GroupName, Config) -> 52: Config. 53: 54: end_per_group(_GroupName, Config) -> 55: Config. 56: 57: 58: 59: 60: plain(doc) -> 61: ["Checking code for the plain backend."]; 62: plain(suite) -> []; 63: plain(Config) when is_list(Config) -> 64: DataDir = ?config(data_dir, Config), 65: OutDir = ?OUT(slask), 66: File = filename:join(DataDir, plain), 67: 68: ?line ok = ic:gen(File,stdopts(OutDir)++[{be,erl_plain}]), 69: 70: ok. 71: 72: 73: 74: 75: %%-------------------------------------------------------------------- 76: %% 77: %% Utilities 78: 79: 80: stdopts(OutDir) -> 81: [{outdir, OutDir}, {maxerrs, infinity}]. 82: 83: 84: 85: 86: 87: to_list(X) when is_atom(X) -> atom_to_list(X); 88: to_list(X) -> X. 89: