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/beam_validator_SUITE.erl | 41 +++++++++++++++++------------- 1 file changed, 24 insertions(+), 17 deletions(-) (limited to 'lib/compiler/test/beam_validator_SUITE.erl') diff --git a/lib/compiler/test/beam_validator_SUITE.erl b/lib/compiler/test/beam_validator_SUITE.erl index 94745e995c..85053f71ed 100644 --- a/lib/compiler/test/beam_validator_SUITE.erl +++ b/lib/compiler/test/beam_validator_SUITE.erl @@ -18,7 +18,7 @@ %% -module(beam_validator_SUITE). --export([all/1,init_per_testcase/2,end_per_testcase/2, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2, beam_files/1,compiler_bug/1,stupid_but_valid/1, xrange/1,yrange/1,stack/1,call_last/1,merge_undefined/1, uninit/1,unsafe_catch/1, @@ -30,7 +30,7 @@ state_after_fault_in_catch/1,no_exception_in_catch/1, undef_label/1,illegal_instruction/1,failing_gc_guard_bif/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). init_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> Dog = test_server:timetrap(?t:minutes(10)), @@ -41,23 +41,30 @@ end_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> ?t:timetrap_cancel(Dog), ok. -all(suite) -> - test_lib:recompile(?MODULE), - [beam_files,compiler_bug,stupid_but_valid, - xrange,yrange,stack,call_last,merge_undefined, - uninit,unsafe_catch, - dead_code,mult_labels, - overwrite_catchtag,overwrite_trytag,accessing_tags,bad_catch_try, - cons_guard, - freg_range,freg_uninit,freg_state, - bin_match,bin_aligned, - bad_dsetel,state_after_fault_in_catch,no_exception_in_catch, - undef_label,illegal_instruction,failing_gc_guard_bif]. +all() -> +test_lib:recompile(beam_validator_SUITE), + [beam_files, compiler_bug, stupid_but_valid, xrange, + yrange, stack, call_last, merge_undefined, uninit, + unsafe_catch, dead_code, mult_labels, + overwrite_catchtag, overwrite_trytag, accessing_tags, + bad_catch_try, cons_guard, freg_range, freg_uninit, + freg_state, bin_match, bin_aligned, bad_dsetel, + state_after_fault_in_catch, no_exception_in_catch, + undef_label, illegal_instruction, failing_gc_guard_bif]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + beam_files(Config) when is_list(Config) -> - ?line {ok,Cwd} = file:get_cwd(), - ?line Parent = filename:dirname(Cwd), - ?line Wc = filename:join([Parent,"*","*.beam"]), + ?line DataDir = proplists:get_value(data_dir, Config), + ?line Wc = filename:join([DataDir,"..","..","*","*.beam"]), %% Must have at least two files here, or there will be %% a grammatical error in the output of the io:format/2 call below. ;-) ?line [_,_|_] = Fs = filelib:wildcard(Wc), -- cgit v1.2.3