aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test/ct_hooks_SUITE_data
AgeCommit message (Collapse)Author
2017-05-04Update copyright yearRaimo Niskanen
2017-02-20[ct] Correctly handle process died in init and end_per_testcaseSiri Hansen
Documentation says that a test case is skipped if init_per_testcase fails. This is correct if init_per_testcase fails in a normal way, but if it gets an exit signal causing the process to die, then the case was earlier marked as failed with reason {skip,...}. This is now corrected, so the case is auto skipped. If end_per_testcase crashes, it does not change the result of a test case, it only adds a warning in the comment field. But if it gets an exit signal causing the process to die while running end_per_testcase, then the case was earlier marked as failed in addition to this warning. This is now corrected, so the result of the test case is not changed by an exit signal during end_per_testcase.
2017-02-20[ct] Fix faulty hook callbacks for skipped testsSiri Hansen
The following bugs are corrected: * Tests that were skipped before calling pre_init_per_* got faulty calls to the corresponding post_init_per_*. E.g. if a test was skipped because suite/0 returned a 'require' statement that was not fulfilled, then post_init_per_suite would be called, even though pre_init_per_suite and init_per_suite were not called. * Tests that were skipped before or in init_per_testcase got faulty calls to pre_end_per_testcase and post_end_per_testcase (end_per_testcase is not called in these situations). Test are added to make sure that the expected callbacks, and only those, are called when tests are skipped in different ways. Conflicts: lib/common_test/test/ct_hooks_SUITE.erl
2017-02-20[ct] Fix hooks and fail when one of init/end_per_* does not exitSiri Hansen
The following bugs are corrected: - if init_per_suite is exported from a test suite, but not end_per_suite, then pre/post_end_per_suite will be called with Suite=ct_framework instead of the correct suite name. - if end_per_group is exported from a suite, but not init_per_group, then end_per_group is never called. According to the documentation, if implementing an init config function, you must also implement the end config function, so the two scenarios above are really not allowed. To make this more visible, common_test will now mark the non-exported config function as failed with reason 'undef' if the other function is exported. For example, if init_per_suite is exported, but not end_per_suite, then end_per_suite will be marked as failed with reason undef. (If none of them exist, then they will both be marked as passed since the default functions in ct_framework are called instead.) All hook functions are always called with the correct suite name, i.e. never with Suite=ct_framework. Conflicts: lib/common_test/test/ct_hooks_SUITE.erl
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-13Fix problem with incorrect type of timestampsPeter Andersson
OTP-13615
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 bug with clashing timestamp valuesPeter Andersson
2016-03-15update copyright-yearHenrik Nord
2016-03-01Update ct_hooks test suitesPeter Andersson
2015-06-18Change license text to APLv2Bruce Yinhe
2015-03-20Merge branch 'rickard/time_api/OTP-11997'Rickard Green
* rickard/time_api/OTP-11997: (22 commits) Update primary bootstrap inets: Suppress deprecated warning on erlang:now/0 inets: Cleanup of multiple copies of functions Add inets_lib with common functions used by multiple modules inets: Update comments Suppress deprecated warning on erlang:now/0 Use new time API and be back-compatible in inets Remove unused functions and removed redundant test asn1 test SUITE: Eliminate use of now/0 Disable deprecated warning on erlang:now/0 in diameter_lib Use new time API and be back-compatible in ssh Replace all calls to now/0 in CT with new time API functions test_server: Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API otp_SUITE: Warn for calls to erlang:now/0 Replace usage of erlang:now() with usage of new API Multiple timer wheels Erlang based BIF timer implementation for scalability Implement ethread events with timeout ... Conflicts: bootstrap/bin/start.boot bootstrap/bin/start_clean.boot bootstrap/lib/compiler/ebin/beam_asm.beam bootstrap/lib/compiler/ebin/compile.beam bootstrap/lib/kernel/ebin/auth.beam bootstrap/lib/kernel/ebin/dist_util.beam bootstrap/lib/kernel/ebin/global.beam bootstrap/lib/kernel/ebin/hipe_unified_loader.beam bootstrap/lib/kernel/ebin/inet_db.beam bootstrap/lib/kernel/ebin/inet_dns.beam bootstrap/lib/kernel/ebin/inet_res.beam bootstrap/lib/kernel/ebin/os.beam bootstrap/lib/kernel/ebin/pg2.beam bootstrap/lib/stdlib/ebin/dets.beam bootstrap/lib/stdlib/ebin/dets_utils.beam bootstrap/lib/stdlib/ebin/erl_tar.beam bootstrap/lib/stdlib/ebin/escript.beam bootstrap/lib/stdlib/ebin/file_sorter.beam bootstrap/lib/stdlib/ebin/otp_internal.beam bootstrap/lib/stdlib/ebin/qlc.beam bootstrap/lib/stdlib/ebin/random.beam bootstrap/lib/stdlib/ebin/supervisor.beam bootstrap/lib/stdlib/ebin/timer.beam erts/aclocal.m4 erts/emulator/beam/bif.c erts/emulator/beam/erl_bif_info.c erts/emulator/beam/erl_db_hash.c erts/emulator/beam/erl_init.c erts/emulator/beam/erl_process.h erts/emulator/beam/erl_thr_progress.c erts/emulator/beam/utils.c erts/emulator/sys/unix/sys.c erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/init.beam erts/preloaded/src/erts_internal.erl lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl lib/diameter/src/base/diameter_lib.erl lib/kernel/src/os.erl lib/ssh/test/ssh_basic_SUITE.erl system/doc/efficiency_guide/advanced.xml
2015-03-20Replace all calls to now/0 in CT with new time API functionsPeter Andersson
2015-03-18Enable timetrap scaling for all testsPeter Andersson
2015-03-06Merge remote-tracking branch ↵Peter Andersson
'origin/peppe/common_test/inconsistent_return_value' into maint * origin/peppe/common_test/inconsistent_return_value: Add tests Make it possible to skip test case by returning skipped tag OTP-12359
2015-02-17Modify some tests to verify that new functionality worksPeter Andersson
2015-01-28Add testsPeter Andersson
2014-03-12Update test suites and fix various remaining problemsPeter Andersson
2013-11-29Fix CT hook pre_end_per_group causing crash when returning {skip,Reason}Peter Andersson
OTP-11409
2013-08-27Fix error in builtin hook calling non-existing functionPeter Andersson
OTP-11238
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-03-26Fix problem with wrong data_dir sent to hooks if init_per_* is missingPeter Andersson
2012-03-19Fix error with group config deleted before post_end_per_groupPeter Andersson
OTP-9989 Also improve ct_hooks test suite.
2012-03-19Introduce new test suite for CTHsPeter Andersson
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 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-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-02-17Update example cth spec to reflect the implementationLukas Larsson
2011-02-17Rename Suite Callback to Common Test Hook in code and testcasesLukas Larsson