From c0ef28d5eecffc56b72a281a6d73f5ad1504bf0a Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 29 Aug 2012 15:12:51 +0200 Subject: Document that CTHs can get fail/skip as Config OTP-10077 --- lib/common_test/doc/src/ct_hooks.xml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'lib/common_test/doc/src/ct_hooks.xml') diff --git a/lib/common_test/doc/src/ct_hooks.xml b/lib/common_test/doc/src/ct_hooks.xml index b98c04a850..b3e713c77f 100644 --- a/lib/common_test/doc/src/ct_hooks.xml +++ b/lib/common_test/doc/src/ct_hooks.xml @@ -5,7 +5,7 @@
- 20102011 + 20102012 Ericsson AB. All Rights Reserved. @@ -111,11 +111,12 @@ - Module:pre_init_per_suite(SuiteName, Config, CTHState) -> + Module:pre_init_per_suite(SuiteName, InitData, CTHState) -> Result Called before init_per_suite SuiteName = atom() + InitData = Config | SkipOrFail Config = NewConfig = [{Key,Value}] CTHState = NewCTHState = term() Result = {Return, NewCTHState} @@ -140,7 +141,8 @@

SuiteName is the name of the suite to be run.

-

Config is the original config list of the test suite.

+

InitData is the original config list of the test suite, or + a SkipOrFail tuple if a previous CTH has returned this.

CTHState is the current internal state of the CTH.

@@ -212,11 +214,12 @@
- Module:pre_init_per_group(GroupName, Config, CTHState) -> + Module:pre_init_per_group(GroupName, InitData, CTHState) -> Result Called before init_per_group GroupName = atom() + InitData = Config | SkipOrFail Config = NewConfig = [{Key,Value}] CTHState = NewCTHState = term() Result = {NewConfig | SkipOrFail, NewCTHState} @@ -269,11 +272,12 @@ - Module:pre_init_per_testcase(TestcaseName, Config, CTHState) -> + Module:pre_init_per_testcase(TestcaseName, InitData, CTHState) -> Result Called before init_per_testcase TestcaseName = atom() + InitData = Config | SkipOrFail Config = NewConfig = [{Key,Value}] CTHState = NewCTHState = term() Result = {NewConfig | SkipOrFail, NewCTHState} @@ -330,11 +334,12 @@ - Module:pre_end_per_group(GroupName, Config, CTHState) -> + Module:pre_end_per_group(GroupName, EndData, CTHState) -> Result Called before end_per_group GroupName = atom() + EndData = Config | SkipOrFail Config = NewConfig = [{Key,Value}] CTHState = NewCTHState = term() Result = {NewConfig | SkipOrFail, NewCTHState} @@ -387,11 +392,12 @@ - Module:pre_end_per_suite(SuiteName, Config, CTHState) -> + Module:pre_end_per_suite(SuiteName, EndData, CTHState) -> Result Called before end_per_suite SuiteName = atom() + EndData = Config | SkipOrFail Config = NewConfig = [{Key,Value}] CTHState = NewCTHState = term() Result = {NewConfig | SkipOrFail, NewCTHState} -- cgit v1.2.3