From 2cbb5d191fd8f94c113cbf61c243999388f65c3b Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 5 Oct 2010 17:58:16 +0200 Subject: Update all fin_per_testcase to end_per_testcase. --- lib/parsetools/test/leex_SUITE.erl | 6 +++--- lib/parsetools/test/yecc_SUITE.erl | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/parsetools') diff --git a/lib/parsetools/test/leex_SUITE.erl b/lib/parsetools/test/leex_SUITE.erl index 069f780b5e..5e210cc8eb 100644 --- a/lib/parsetools/test/leex_SUITE.erl +++ b/lib/parsetools/test/leex_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2010. 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 @@ -35,7 +35,7 @@ -define(privdir, ?config(priv_dir, Config)). -endif. --export([all/1, init_per_testcase/2, fin_per_testcase/2]). +-export([all/1, init_per_testcase/2, end_per_testcase/2]). -export([checks/1, file/1, compile/1, syntax/1, @@ -49,7 +49,7 @@ init_per_testcase(_Case, Config) -> ?line Dog = ?t:timetrap(?default_timeout), [{watchdog, Dog} | Config]. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> Dog = ?config(watchdog, Config), test_server:timetrap_cancel(Dog), ok. diff --git a/lib/parsetools/test/yecc_SUITE.erl b/lib/parsetools/test/yecc_SUITE.erl index 8153be7e61..f691249e65 100644 --- a/lib/parsetools/test/yecc_SUITE.erl +++ b/lib/parsetools/test/yecc_SUITE.erl @@ -34,7 +34,7 @@ -define(privdir, ?config(priv_dir, Config)). -endif. --export([all/1, init_per_testcase/2, fin_per_testcase/2]). +-export([all/1, init_per_testcase/2, end_per_testcase/2]). -export([app_test/1, checks/1, @@ -55,7 +55,7 @@ init_per_testcase(_Case, Config) -> ?line Dog = ?t:timetrap(?default_timeout), [{watchdog, Dog} | Config]. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> Dog = ?config(watchdog, Config), test_server:timetrap_cancel(Dog), ok. -- cgit v1.2.3 From c61a61372c62183f7f75811fd77734b618ee929b Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 12 Oct 2010 11:02:43 +0200 Subject: Update parsetools tests to conform with common_test standard --- lib/parsetools/test/leex_SUITE.erl | 26 +++++++++++++++-------- lib/parsetools/test/parsetools.spec | 2 +- lib/parsetools/test/yecc_SUITE.erl | 41 ++++++++++++++++++++++--------------- 3 files changed, 43 insertions(+), 26 deletions(-) (limited to 'lib/parsetools') diff --git a/lib/parsetools/test/leex_SUITE.erl b/lib/parsetools/test/leex_SUITE.erl index 5e210cc8eb..8b2cf1e4f3 100644 --- a/lib/parsetools/test/leex_SUITE.erl +++ b/lib/parsetools/test/leex_SUITE.erl @@ -30,16 +30,16 @@ -define(privdir, "leex_SUITE_priv"). -define(t, test_server). -else. --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -define(datadir, ?config(data_dir, Config)). -define(privdir, ?config(priv_dir, Config)). -endif. --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]). --export([checks/1, +-export([ file/1, compile/1, syntax/1, - examples/1, + pt/1, man/1, ex/1, ex2/1, not_yet/1]). % Default timetrap timeout (set in init_per_testcase). @@ -54,10 +54,20 @@ end_per_testcase(_Case, Config) -> test_server:timetrap_cancel(Dog), ok. -all(suite) -> [checks, examples]. +all() -> +[{group, checks}, {group, examples}]. + +groups() -> + [{checks, [], [file, compile, syntax]}, + {examples, [], [pt, man, ex, ex2, not_yet]}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + -checks(suite) -> - [file, compile, syntax]. file(doc) -> "Bad files and options."; @@ -330,8 +340,6 @@ syntax(Config) when is_list(Config) -> leex:file(Filename, Ret), ok. -examples(suite) -> - [pt,man,ex,ex2,not_yet]. pt(doc) -> "Pushing back characters."; diff --git a/lib/parsetools/test/parsetools.spec b/lib/parsetools/test/parsetools.spec index 5b34633378..97dfe58f97 100644 --- a/lib/parsetools/test/parsetools.spec +++ b/lib/parsetools/test/parsetools.spec @@ -1 +1 @@ -{topcase, {dir, "../parsetools_test"}}. +{suites,"parsetools_test",all}. diff --git a/lib/parsetools/test/yecc_SUITE.erl b/lib/parsetools/test/yecc_SUITE.erl index f691249e65..b504498b79 100644 --- a/lib/parsetools/test/yecc_SUITE.erl +++ b/lib/parsetools/test/yecc_SUITE.erl @@ -29,23 +29,23 @@ -define(privdir, "yecc_SUITE_priv"). -define(t, test_server). -else. --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -define(datadir, ?config(data_dir, Config)). -define(privdir, ?config(priv_dir, Config)). -endif. --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]). -export([app_test/1, - checks/1, + file/1, syntax/1, compile/1, rules/1, expect/1, conflicts/1, - examples/1, + empty/1, prec/1, yeccpre/1, lalr/1, old_yecc/1, other_examples/1, - bugs/1, + otp_5369/1, otp_6362/1, otp_7945/1, otp_8483/1, otp_8486/1, - improvements/1, + otp_7292/1, otp_7969/1, otp_8919/1]). % Default timetrap timeout (set in init_per_testcase). @@ -60,7 +60,25 @@ end_per_testcase(_Case, Config) -> test_server:timetrap_cancel(Dog), ok. -all(suite) -> [app_test, checks, examples, bugs, improvements]. +all() -> +[app_test, {group, checks}, {group, examples}, + {group, bugs}, {group, improvements}]. + +groups() -> + [{checks, [], + [file, syntax, compile, rules, expect, conflicts]}, + {examples, [], + [empty, prec, yeccpre, lalr, old_yecc, other_examples]}, + {bugs, [], + [otp_5369, otp_6362, otp_7945, otp_8483, otp_8486]}, + {improvements, [], [otp_7292, otp_7969]}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + app_test(doc) -> ["Tests the applications consistency."]; @@ -70,8 +88,6 @@ app_test(Config) when is_list(Config) -> ?line ok=?t:app_test(parsetools), ok. -checks(suite) -> - [file, syntax, compile, rules, expect, conflicts]. file(doc) -> "Bad files and options."; @@ -730,8 +746,6 @@ rules(Config) when is_list(Config) -> ?line run(Config, Ts), ok. -examples(suite) -> - [empty, prec, yeccpre, lalr, old_yecc, other_examples]. expect(doc) -> "Check of expect."; @@ -1283,8 +1297,6 @@ other_examples(Config) when is_list(Config) -> ?line run(Config, Ts), ok. -bugs(suite) -> - [otp_5369, otp_6362, otp_7945, otp_8483, otp_8486]. otp_5369(doc) -> "OTP-5369. A bug in parse_and_scan reported on erlang questions."; @@ -1540,9 +1552,6 @@ otp_8486(Config) when is_list(Config) -> ?line run(Config, Ts), ok. -improvements(suite) -> - [otp_7292, otp_7969, otp_8919]. - otp_7292(doc) -> "OTP-7292. Header declarations for edoc."; otp_7292(suite) -> []; -- 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/parsetools/test/leex_SUITE.erl | 4 +++- lib/parsetools/test/yecc_SUITE.erl | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/parsetools') diff --git a/lib/parsetools/test/leex_SUITE.erl b/lib/parsetools/test/leex_SUITE.erl index 8b2cf1e4f3..534f8f7870 100644 --- a/lib/parsetools/test/leex_SUITE.erl +++ b/lib/parsetools/test/leex_SUITE.erl @@ -35,7 +35,7 @@ -define(privdir, ?config(priv_dir, Config)). -endif. --export([all/0,groups/0,init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2]). +-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2]). -export([ file/1, compile/1, syntax/1, @@ -54,6 +54,8 @@ end_per_testcase(_Case, Config) -> test_server:timetrap_cancel(Dog), ok. +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> [{group, checks}, {group, examples}]. diff --git a/lib/parsetools/test/yecc_SUITE.erl b/lib/parsetools/test/yecc_SUITE.erl index b504498b79..4e41fa013d 100644 --- a/lib/parsetools/test/yecc_SUITE.erl +++ b/lib/parsetools/test/yecc_SUITE.erl @@ -34,7 +34,7 @@ -define(privdir, ?config(priv_dir, Config)). -endif. --export([all/0,groups/0,init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2]). +-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2]). -export([app_test/1, @@ -60,6 +60,8 @@ end_per_testcase(_Case, Config) -> test_server:timetrap_cancel(Dog), ok. +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> [app_test, {group, checks}, {group, examples}, {group, bugs}, {group, improvements}]. -- 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/parsetools/test/leex_SUITE.erl | 8 +++++++- lib/parsetools/test/yecc_SUITE.erl | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'lib/parsetools') diff --git a/lib/parsetools/test/leex_SUITE.erl b/lib/parsetools/test/leex_SUITE.erl index 534f8f7870..23ecc265e9 100644 --- a/lib/parsetools/test/leex_SUITE.erl +++ b/lib/parsetools/test/leex_SUITE.erl @@ -35,7 +35,7 @@ -define(privdir, ?config(priv_dir, Config)). -endif. --export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2]). +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2]). -export([ file/1, compile/1, syntax/1, @@ -63,6 +63,12 @@ groups() -> [{checks, [], [file, compile, syntax]}, {examples, [], [pt, man, ex, ex2, not_yet]}]. +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + init_per_group(_GroupName, Config) -> Config. diff --git a/lib/parsetools/test/yecc_SUITE.erl b/lib/parsetools/test/yecc_SUITE.erl index 4e41fa013d..8d6643590e 100644 --- a/lib/parsetools/test/yecc_SUITE.erl +++ b/lib/parsetools/test/yecc_SUITE.erl @@ -34,7 +34,7 @@ -define(privdir, ?config(priv_dir, Config)). -endif. --export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2]). +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2]). -export([app_test/1, @@ -75,6 +75,12 @@ groups() -> [otp_5369, otp_6362, otp_7945, otp_8483, otp_8486]}, {improvements, [], [otp_7292, otp_7969]}]. +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + init_per_group(_GroupName, Config) -> Config. -- cgit v1.2.3 From 1d8922df60645e0ba374ff62a4774c7bc71f4701 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 14 Dec 2010 17:05:19 +0100 Subject: Fix formatting for parsetools --- lib/parsetools/test/leex_SUITE.erl | 18 +++++++++------- lib/parsetools/test/yecc_SUITE.erl | 44 ++++++++++++++++++++------------------ 2 files changed, 33 insertions(+), 29 deletions(-) (limited to 'lib/parsetools') diff --git a/lib/parsetools/test/leex_SUITE.erl b/lib/parsetools/test/leex_SUITE.erl index 23ecc265e9..d57a2acf76 100644 --- a/lib/parsetools/test/leex_SUITE.erl +++ b/lib/parsetools/test/leex_SUITE.erl @@ -35,12 +35,14 @@ -define(privdir, ?config(priv_dir, Config)). -endif. --export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2]). +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, + init_per_group/2,end_per_group/2, + init_per_testcase/2, end_per_testcase/2]). -export([ - file/1, compile/1, syntax/1, - - pt/1, man/1, ex/1, ex2/1, not_yet/1]). + file/1, compile/1, syntax/1, + + pt/1, man/1, ex/1, ex2/1, not_yet/1]). % Default timetrap timeout (set in init_per_testcase). -define(default_timeout, ?t:minutes(1)). @@ -57,11 +59,11 @@ end_per_testcase(_Case, Config) -> suite() -> [{suite_callbacks,[ts_install_scb]}]. all() -> -[{group, checks}, {group, examples}]. + [{group, checks}, {group, examples}]. groups() -> [{checks, [], [file, compile, syntax]}, - {examples, [], [pt, man, ex, ex2, not_yet]}]. + {examples, [], [pt, man, ex, ex2, not_yet]}]. init_per_suite(Config) -> Config. @@ -70,10 +72,10 @@ end_per_suite(_Config) -> ok. init_per_group(_GroupName, Config) -> - Config. + Config. end_per_group(_GroupName, Config) -> - Config. + Config. diff --git a/lib/parsetools/test/yecc_SUITE.erl b/lib/parsetools/test/yecc_SUITE.erl index 8d6643590e..961fc0b05f 100644 --- a/lib/parsetools/test/yecc_SUITE.erl +++ b/lib/parsetools/test/yecc_SUITE.erl @@ -34,19 +34,21 @@ -define(privdir, ?config(priv_dir, Config)). -endif. --export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2]). +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, + init_per_group/2,end_per_group/2, + init_per_testcase/2, end_per_testcase/2]). -export([app_test/1, - - file/1, syntax/1, compile/1, rules/1, expect/1, - conflicts/1, - - empty/1, prec/1, yeccpre/1, lalr/1, old_yecc/1, - other_examples/1, - - otp_5369/1, otp_6362/1, otp_7945/1, otp_8483/1, otp_8486/1, - - otp_7292/1, otp_7969/1, otp_8919/1]). + + file/1, syntax/1, compile/1, rules/1, expect/1, + conflicts/1, + + empty/1, prec/1, yeccpre/1, lalr/1, old_yecc/1, + other_examples/1, + + otp_5369/1, otp_6362/1, otp_7945/1, otp_8483/1, otp_8486/1, + + otp_7292/1, otp_7969/1, otp_8919/1]). % Default timetrap timeout (set in init_per_testcase). -define(default_timeout, ?t:minutes(1)). @@ -63,17 +65,17 @@ end_per_testcase(_Case, Config) -> suite() -> [{suite_callbacks,[ts_install_scb]}]. all() -> -[app_test, {group, checks}, {group, examples}, - {group, bugs}, {group, improvements}]. + [app_test, {group, checks}, {group, examples}, + {group, bugs}, {group, improvements}]. groups() -> [{checks, [], - [file, syntax, compile, rules, expect, conflicts]}, - {examples, [], - [empty, prec, yeccpre, lalr, old_yecc, other_examples]}, - {bugs, [], - [otp_5369, otp_6362, otp_7945, otp_8483, otp_8486]}, - {improvements, [], [otp_7292, otp_7969]}]. + [file, syntax, compile, rules, expect, conflicts]}, + {examples, [], + [empty, prec, yeccpre, lalr, old_yecc, other_examples]}, + {bugs, [], + [otp_5369, otp_6362, otp_7945, otp_8483, otp_8486]}, + {improvements, [], [otp_7292, otp_7969, otp_8919]}]. init_per_suite(Config) -> Config. @@ -82,10 +84,10 @@ end_per_suite(_Config) -> ok. init_per_group(_GroupName, Config) -> - Config. + Config. end_per_group(_GroupName, Config) -> - Config. + Config. app_test(doc) -> -- cgit v1.2.3 From 5fef403779c4894189abf6fd18e6c8e5d54064c5 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 7 Dec 2010 17:52:12 +0100 Subject: Update all test specs --- lib/parsetools/test/parsetools.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/parsetools') diff --git a/lib/parsetools/test/parsetools.spec b/lib/parsetools/test/parsetools.spec index 97dfe58f97..870d57baf1 100644 --- a/lib/parsetools/test/parsetools.spec +++ b/lib/parsetools/test/parsetools.spec @@ -1 +1 @@ -{suites,"parsetools_test",all}. +{suites,"../parsetools_test",all}. -- cgit v1.2.3 From cfa01c9bd748df38750dc4841030e6520610538a Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 12 Jan 2011 14:56:23 +0100 Subject: Update and add cover spec files to work with common_test --- lib/parsetools/test/Makefile | 2 +- lib/parsetools/test/parsetools.cover | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 lib/parsetools/test/parsetools.cover (limited to 'lib/parsetools') diff --git a/lib/parsetools/test/Makefile b/lib/parsetools/test/Makefile index 19354b87b2..2d9d0a71e5 100644 --- a/lib/parsetools/test/Makefile +++ b/lib/parsetools/test/Makefile @@ -71,7 +71,7 @@ release_spec: opt release_tests_spec: make_emakefile $(INSTALL_DIR) $(RELSYSDIR) - $(INSTALL_DATA) parsetools.spec $(EMAKEFILE) $(ERL_FILES) $(RELSYSDIR) + $(INSTALL_DATA) parsetools.spec parsetools.cover $(EMAKEFILE) $(ERL_FILES) $(RELSYSDIR) chmod -f -R u+w $(RELSYSDIR) # @tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -) diff --git a/lib/parsetools/test/parsetools.cover b/lib/parsetools/test/parsetools.cover new file mode 100644 index 0000000000..13f84e3ba6 --- /dev/null +++ b/lib/parsetools/test/parsetools.cover @@ -0,0 +1,2 @@ +{incl_app,parsetools,details}. + -- 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/parsetools/test/leex_SUITE.erl | 2 +- lib/parsetools/test/yecc_SUITE.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/parsetools') diff --git a/lib/parsetools/test/leex_SUITE.erl b/lib/parsetools/test/leex_SUITE.erl index d57a2acf76..066d221ae7 100644 --- a/lib/parsetools/test/leex_SUITE.erl +++ b/lib/parsetools/test/leex_SUITE.erl @@ -56,7 +56,7 @@ end_per_testcase(_Case, Config) -> test_server:timetrap_cancel(Dog), ok. -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [{group, checks}, {group, examples}]. diff --git a/lib/parsetools/test/yecc_SUITE.erl b/lib/parsetools/test/yecc_SUITE.erl index 961fc0b05f..8e27ddb13d 100644 --- a/lib/parsetools/test/yecc_SUITE.erl +++ b/lib/parsetools/test/yecc_SUITE.erl @@ -62,7 +62,7 @@ end_per_testcase(_Case, Config) -> test_server:timetrap_cancel(Dog), ok. -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [app_test, {group, checks}, {group, examples}, -- cgit v1.2.3