aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_hooks.erl
AgeCommit message (Collapse)Author
2017-06-16[ct] Print unicode atoms and strings correctly in common_test logsSiri Hansen
And use correct encoding when printing to files.
2017-05-04Update copyright yearRaimo Niskanen
2017-02-20[ct] Add Suite argument to hook callback functionsSiri Hansen
An extra argument, Suite, is added as the first argument to each of the following hook callback functions: - pre_init_per_group - post_init_per_group - pre_end_per_group - post_end_per_group - pre_init_per_testcase - post_init_per_testcase - pre_end_per_testcase - post_end_per_testcase - on_tc_fail - on_tc_skip For backwards compatibility, if the new function is not exported from a hook callback module, common_test will fall back to the old interface and call the function without the Suite argument. The reason for adding the new argument is that if a test suite is skipped by a 'skip_suites' statement in the test specification, then there will be no call to pre/post_init_per_suite, and thus the hook has no other way of knowing which Suite is skipped when it gets the on_tc_skip callback. The other callbacks are updated for symmetry.
2016-06-07ct_hooks: Fix unmatched_return warningsZandra
2016-05-04Merge branch 'maint-18'Henrik Nord
Conflicts: OTP_VERSION lib/common_test/test/ct_hooks_SUITE_data/cth/tests/ct_update_config_SUITE.erl lib/common_test/vsn.mk
2016-05-02Fix various log related problemsPeter Andersson
2016-03-15update copyright-yearHenrik Nord
2016-03-05Add missing internal hook functionsPeter Andersson
2016-03-03Fix remaining issuesPeter Andersson
2016-03-01Introduce new CT hook functionsPeter Andersson
2015-06-18Change license text to APLv2Bruce Yinhe
2014-03-24Update incorrect type specificationsPeter Andersson
2014-03-12Update event protocol and CT Hooks APIPeter Andersson
2014-03-12Introduce group name for skipped cases in events, hooks and overview logPeter Andersson
2013-09-03Find and fix minor bugsPeter Andersson
2013-09-02Fix problem with start order of hooks and stopping of ct_util_serverPeter Andersson
2013-01-25[common_test] Update common test modules to handle unicodeSiri Hansen
* Use UTF-8 encoding for all HTML files, except the HTML version of the test suite generated with erl2html2:convert, which will have the same encoding as the original test suite (.erl) file. * Encode link targets in HTML files with test_server_ctrl:uri_encode/1. * Use unicode modifier 't' with ~s when appropriate. * Use unicode:characters_to_list and unicode:characters_to_binary for conversion between binaries and strings instead of binary_to_list and list_to_binary.
2012-08-23Fix error in function specificationPeter Andersson
2012-08-23Merge remote branch 'origin/peppe/common_test/hook_init_order' into maintPeter Andersson
* origin/peppe/common_test/hook_init_order: Call CT Hook init functions in the correct order OTP-10135
2012-07-06Call CT Hook init functions in the correct orderPeter Andersson
OTP-10135
2012-05-10Fix IO printout crash caused by hook functionPeter Andersson
2012-05-04Fix timetrap error in pre-hooksPeter Andersson
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-03-19Fix bug in handling ct_hooks start argumentsPeter Andersson
2012-03-19Use calls to ct_framework:init/end_per_suite for configurationPeter Andersson
Now that calls to ct_framework:init/end_per_suite take place whenever init/end_per_suite is missing in the test suite, these calls should trigger init/end_tc to perform configuration (such as calling calling CTH functions, suite/0, etc).
2012-03-19Change ct_init/end_per_group to init/end_per_groupPeter Andersson
OTP-9986
2012-03-19Run hooks for non-existing config functionsPeter Andersson
2011-11-29Reverse hook order for *_end_per_* hooksLukas Larsson
2011-09-26Merge branch 'dev' into majorLukas
* dev: Add documentation for cth_log_redirect and built-in hooks Correct wrong match from lists:keyfind Update cth_log_redirect to wait for all error_logger events before ending test Force logging to framework log for parallel tests Add ct_log:ct_log funcion Add a hook for redirecting SASL and error_logger messages Add -enable_builtin_hooks <bool> config option Export write_events and add option to return a string
2011-09-20Add -enable_builtin_hooks <bool> config optionLukas Larsson
This option allows ct users to disable the default hooks which are installed when common_test is started. The builtin hooks themselved are listed in ct_hooks. OTP-9564
2011-09-02Merge branch 'dev' into majorHans Bolinder
* dev: Fix a couple of minor bugs with hook priority Update to reflect addition of CTH priority addition Update CTH priority default to be 0 Update to reflect new cth callback api Update the return from init/2 to be {ok, NewState} or {ok,NewState,Priority} instead of NewState. Add priority functionality and tests for ct hooks Update internal hooks state to use a record instead of tuples Improve and correct types and specifications in Kernel and STDLIB
2011-08-31Fix a couple of minor bugs with hook priorityLukas Larsson
The bugs caused the sorting priority to be wrong when using installed priority and built in priority. Tests to prove the order of hooks to be correct have also been added.
2011-08-31Update CTH priority default to be 0Lukas Larsson
2011-08-31Update the return from init/2 to be {ok, NewState} or {ok,NewState,Priority} ↵Lukas Larsson
instead of NewState. NewState can still be returned, but is only kept for backward compatability reasons.
2011-08-31Add priority functionality and tests for ct hooksLukas Larsson
Priority allows the user of ct hooks to specify which order the hooks should execute in. The priority of a hook is specified when installing the hook, and stays the same for both pre and post hooks
2011-08-31Update internal hooks state to use a record instead of tuplesLukas Larsson
2011-08-29Merge branch 'dev' into majorHenrik Nord
2011-08-16emulator: Add a fourth element in exception stacktracesBjörn Gustavsson
This commit is a preparation for introducing location information (filename/line number) in stacktraces in exceptions. Currently a stack trace looks like: [{Mod1,Function1,Arity1}, . . . {ModN,FunctionN,ArityN}] Add a forth element to each tuple that can be used indication the filename and line number of the source file: [{Mod1,Function1,Arity1,Location1}, . . . {ModN,FunctionN,ArityN,LocationN}] In this commit, the fourth element will just be an empty list, and we will change all code that look at or manipulate stacktraces.
2011-05-24Add a proplist() typerzezeski
Recently I was adding specs to an API and found that there is no canonical proplist() type defined.
2011-03-22Fix bug which would make cth's to not be removed when out of scope when ↵Lukas Larsson
adding a cth in suite/0 and crashing in pre_init_per_suite.
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-03-09Update init_per_suite to not crash when there is no suite/0Lukas Larsson
2011-02-21Update ct_hooks to fail gracefully when a hook is entered incorrectly in suite/0Lukas Larsson
2011-02-17Cleanup code to fix dialyzer warningLukas Larsson
2011-02-17Rename Suite Callback to Common Test Hook in code and testcasesLukas Larsson