From 3d0f4a3085f11389e5b22d10f96f0cbf08c9337f Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 12 Oct 2010 10:43:56 +0200 Subject: Update compiler tests to conform with common_test standard --- lib/compiler/test/compilation_SUITE.erl | 55 +++++++++++++++++---------------- 1 file changed, 29 insertions(+), 26 deletions(-) (limited to 'lib/compiler/test/compilation_SUITE.erl') diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl index 935e384d2d..364e8ceba8 100644 --- a/lib/compiler/test/compilation_SUITE.erl +++ b/lib/compiler/test/compilation_SUITE.erl @@ -20,34 +20,38 @@ -module(compilation_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -compile(export_all). -all(suite) -> - test_lib:recompile(?MODULE), - [self_compile_old_inliner,self_compile, - compiler_1,compiler_3,compiler_5, - beam_compiler_1, beam_compiler_2, beam_compiler_3, - beam_compiler_4, beam_compiler_5, beam_compiler_6, - beam_compiler_7, beam_compiler_8, beam_compiler_9, - beam_compiler_10, beam_compiler_11, beam_compiler_12, - nested_tuples_in_case_expr, - otp_2330, guards, vsn, - otp_2380, otp_2141, otp_2173, otp_4790, - const_list_256, - bin_syntax_1, bin_syntax_2, bin_syntax_3, - bin_syntax_4, bin_syntax_5, bin_syntax_6, - live_var, convopts, - bad_functional_value, - catch_in_catch, redundant_case, long_string, - otp_5076, complex_guard, otp_5092, otp_5151, - otp_5235,otp_5244, - trycatch_4, opt_crash, - otp_5404,otp_5436,otp_5481,otp_5553,otp_5632, - otp_5714,otp_5872,otp_6121,otp_6121a,otp_6121b, - otp_7202,otp_7345,on_load,string_table,otp_8949_a,otp_8949_a - ]. +all() -> + test_lib:recompile(compilation_SUITE), + [self_compile_old_inliner, self_compile, compiler_1, + compiler_3, compiler_5, beam_compiler_1, + beam_compiler_2, beam_compiler_3, beam_compiler_4, + beam_compiler_5, beam_compiler_6, beam_compiler_7, + beam_compiler_8, beam_compiler_9, beam_compiler_10, + beam_compiler_11, beam_compiler_12, + nested_tuples_in_case_expr, otp_2330, guards, + {group, vsn}, otp_2380, otp_2141, otp_2173, otp_4790, + const_list_256, bin_syntax_1, bin_syntax_2, + bin_syntax_3, bin_syntax_4, bin_syntax_5, bin_syntax_6, + live_var, convopts, bad_functional_value, + catch_in_catch, redundant_case, long_string, otp_5076, + complex_guard, otp_5092, otp_5151, otp_5235, otp_5244, + trycatch_4, opt_crash, otp_5404, otp_5436, otp_5481, + otp_5553, otp_5632, otp_5714, otp_5872, otp_6121, + otp_6121a, otp_6121b, otp_7202, otp_7345, on_load, + string_table,otp_8949_a,otp_8949_a]. + +groups() -> + [{vsn, [], [vsn_1, vsn_2, vsn_3]}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -define(comp(N), N(Config) when is_list(Config) -> try_it(N, Config)). @@ -311,7 +315,6 @@ from(H, [H | T]) -> T; from(H, [_ | T]) -> from(H, T); from(_, []) -> []. -vsn(suite) -> [vsn_1, vsn_2, vsn_3]. vsn_1(doc) -> "Test generation of 'vsn' attribute"; -- cgit v1.2.3 From 83f932257470f5ae01fc61130e997fdea0562653 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 6 Dec 2010 16:48:31 +0100 Subject: Add ts_install_scb to suite/0 --- lib/compiler/test/compilation_SUITE.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/compiler/test/compilation_SUITE.erl') diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl index 364e8ceba8..d747cd459c 100644 --- a/lib/compiler/test/compilation_SUITE.erl +++ b/lib/compiler/test/compilation_SUITE.erl @@ -24,6 +24,8 @@ -compile(export_all). +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> test_lib:recompile(compilation_SUITE), [self_compile_old_inliner, self_compile, compiler_1, -- cgit v1.2.3 From 8fd1f31f3074bc9444a0769418506b1ccc2041d3 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 7 Dec 2010 11:35:13 +0100 Subject: Add init_per_suite and end_per_suite --- lib/compiler/test/compilation_SUITE.erl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/compiler/test/compilation_SUITE.erl') diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl index d747cd459c..5651adf721 100644 --- a/lib/compiler/test/compilation_SUITE.erl +++ b/lib/compiler/test/compilation_SUITE.erl @@ -49,6 +49,12 @@ all() -> groups() -> [{vsn, [], [vsn_1, vsn_2, vsn_3]}]. +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + init_per_group(_GroupName, Config) -> Config. -- cgit v1.2.3 From c777f9b28459cb83b4fd0e07fac76432113c63f4 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 14 Dec 2010 11:37:41 +0100 Subject: Fix formatting for compiler --- lib/compiler/test/compilation_SUITE.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/compiler/test/compilation_SUITE.erl') diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl index 5651adf721..746c74f6a9 100644 --- a/lib/compiler/test/compilation_SUITE.erl +++ b/lib/compiler/test/compilation_SUITE.erl @@ -56,10 +56,10 @@ end_per_suite(_Config) -> ok. init_per_group(_GroupName, Config) -> - Config. + Config. end_per_group(_GroupName, Config) -> - Config. + Config. -define(comp(N), N(Config) when is_list(Config) -> try_it(N, Config)). -- cgit v1.2.3 From 308d6638450f5ffc7f432302367e84bcd92ea683 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 9 Feb 2011 19:10:44 +0100 Subject: Rename Suite Callback to Common Test Hook --- lib/compiler/test/compilation_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/compiler/test/compilation_SUITE.erl') diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl index 746c74f6a9..6cd133ee39 100644 --- a/lib/compiler/test/compilation_SUITE.erl +++ b/lib/compiler/test/compilation_SUITE.erl @@ -24,7 +24,7 @@ -compile(export_all). -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> test_lib:recompile(compilation_SUITE), -- cgit v1.2.3 From c347415765f4e30e38e49f5bd369f48523ef935e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 23 Feb 2011 13:18:28 +0100 Subject: compiler: Eliminate some warnings --- lib/compiler/test/compilation_SUITE.erl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/compiler/test/compilation_SUITE.erl') diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl index 6cd133ee39..ba225b66d0 100644 --- a/lib/compiler/test/compilation_SUITE.erl +++ b/lib/compiler/test/compilation_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2010. All Rights Reserved. +%% Copyright Ericsson AB 1997-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -163,7 +163,7 @@ split({int, N}, <>) -> beam_compiler_7(doc) -> "Code snippet submitted from Ulf Wiger which fails in R3 Beam."; beam_compiler_7(suite) -> []; -beam_compiler_7(Config) when list(Config) -> +beam_compiler_7(Config) when is_list(Config) -> ?line done = empty(2, false). empty(N, Toggle) when N > 0 -> @@ -327,7 +327,7 @@ from(_, []) -> []. vsn_1(doc) -> "Test generation of 'vsn' attribute"; vsn_1(suite) -> []; -vsn_1(Conf) when list(Conf) -> +vsn_1(Conf) when is_list(Conf) -> ?line M = vsn_1, ?line compile_load(M, ?config(data_dir, Conf), Conf), @@ -351,7 +351,7 @@ vsn_1(Conf) when list(Conf) -> vsn_2(doc) -> "Test overriding of generation of 'vsn' attribute"; vsn_2(suite) -> []; -vsn_2(Conf) when list(Conf) -> +vsn_2(Conf) when is_list(Conf) -> ?line M = vsn_2, ?line compile_load(M, ?config(data_dir, Conf), Conf), @@ -367,7 +367,7 @@ vsn_2(Conf) when list(Conf) -> vsn_3(doc) -> "Test that different code yields different generated 'vsn'"; vsn_3(suite) -> []; -vsn_3(Conf) when list(Conf) -> +vsn_3(Conf) when is_list(Conf) -> ?line M = vsn_3, ?line compile_load(M, ?config(data_dir, Conf), Conf), -- cgit v1.2.3