aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src
AgeCommit message (Collapse)Author
2017-04-20test_server: Change compatibility to R16Björn Gustavsson
2017-04-12Merge branch 'siri/ct/scale-on-valgrind'Siri Hansen
* siri/ct/scale-on-valgrind: [ct] Scale timetraps when running valgrind
2017-04-12[ct] Scale timetraps when running valgrindSiri Hansen
2017-04-06Merge branch 'tsloughter/ct_slave-nodename-inconsistency/PR-1095/OTP-13806'Zandra Norman
* tsloughter/ct_slave-nodename-inconsistency/PR-1095/OTP-13806: handle ct_slave nodename in the same way as net_kernel
2017-03-20[ct] Add 'keep_logs' optionSiri Hansen
If setting the value for this option to an integer, N, common_test will remove all ct_run.* directories in the current log directory, except the N newest. The default value for the 'keep_logs' option is 'all', which means that no logs will be deleted. 'keep_logs' can be used in combination with refresh_logs, or in a normal common_test test run.
2017-03-09Merge branch 'siri/typer/remove-application/OTP-14251'Siri Hansen
* siri/typer/remove-application/OTP-14251: Remove typer application
2017-03-08Remove typer applicationSiri Hansen
The application now has an own repo, https://github.com/erlang/typer
2017-03-06Merge branch 'maint'Peter Andersson
2017-03-06Merge branch 'peppe/common_test/multiply_timetraps/OTP-14210' into maintPeter Andersson
* peppe/common_test/multiply_timetraps/OTP-14210: Fix multiply/scale_timetraps in testspecs not working OTP-14210
2017-03-06Merge branch 'maint'Siri Hansen
2017-03-06Merge branch 'siri/ct_hooks/callbacks-on-skip/OTP-10599' into maintSiri Hansen
* siri/ct_hooks/callbacks-on-skip/OTP-10599: [ct] Update built-in ct hooks with new Suite parameter [cth_surefire] Handle skips from test spec [ct] Remove excessive skipped/failed tag in hook function [ct] Send tc_start event on force_stop and failed sequence [ct] Correctly handle process died in init and end_per_testcase [ct] Fix faulty hook callbacks for skipped tests Add dummy end_per_suite/1 [ct] Fix hooks and fail when one of init/end_per_* does not exit [ct] Add Suite argument to hook callback functions [ct] Fix function_clause in ct_framework when hook function crashes
2017-02-22Merge branch 'maint'Siri Hansen
2017-02-21Fix multiply/scale_timetraps in testspecs not workingPeter Andersson
OTP-14210
2017-02-21[ct] Update built-in ct hooks with new Suite parameterSiri Hansen
The Suite parameter is added to all group- and testcase hook callbacks. This commit updates cth_conn_log and cth_log_redirect according to this new API.
2017-02-21[cth_surefire] Handle skips from test specSiri Hansen
When a test case is skipped from the test spec, there is no call to the common_test hook functions 'pre_init_per_testcase' and 'post_end_per_testcase'. This causes cth_surefire to erroneously mark the previous test case as skipped in the xml report. The actually skipped test case is not present in the xml report at all. This is now corrected. OTP-14129
2017-02-20[ct] Remove excessive skipped/failed tag in hook functionSiri Hansen
When skipping or failing in a configuration function, the configuration function itself would get {auto_skipped,Reason}, {skipped,Reason} or {failed,Reason} in the hook callbacks on_tc_skip or on_tc_fail. The other test cases that were skipped as a result of this would only get Reason in the hook callbacks. This is now corrected.
2017-02-20[ct] Send tc_start event on force_stop and failed sequenceSiri Hansen
If test cases were skipped because of option {force_stop,skip_rest} or because of a failed sequence, then no tc_start event would be sent, only only tc_done. This is now corrected.
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.
2017-02-15[ct] Fix function_clause in ct_framework when hook function crashesSiri Hansen
If CtHook:pre_init_per_testcase(...,end_per_testcase,...) failed, then the ct_framework:end_tc would fail with function_clause. This is now corrected.
2017-01-11[ct] Add ct_testspec:get_tests/1Siri Hansen
This API function is used by rebar3 instead of implementing test spec parsing again.
2017-01-11Merge branch 'maint'Siri Hansen
2017-01-10Add ct_default_gl to common_test.app.srcSiri Hansen
2016-12-07Merge branch 'maint'Dan Gudmundsson
* maint: Update copyright-year Conflicts: lib/dialyzer/src/dialyzer.hrl lib/dialyzer/src/dialyzer_options.erl lib/dialyzer/test/opaque_SUITE_data/src/recrec/dialyzer.hrl lib/dialyzer/test/opaque_SUITE_data/src/recrec/dialyzer_races.erl lib/hipe/icode/hipe_icode.erl lib/hipe/main/hipe.erl lib/hipe/main/hipe.hrl.src lib/hipe/main/hipe_main.erl
2016-12-07Update copyright-yearErlang/OTP
2016-12-02Merge branch 'richcarl/default-compiler-flags/PR-1226/OTP-14071'Björn Gustavsson
* richcarl/default-compiler-flags/PR-1226/OTP-14071: stdlib test suite: fix uses of export_all diameter tests: Eliminate use of -compile(export_all) asn1 test suite: Suppress warnings for -compile(export_all) Remove left-over uses of -compile(export_all) Make warn_export_all the default warn_obsolete_guard is already default
2016-12-02Make sure group leader processes terminate properlyPeter Andersson
OTP-14026
2016-12-02Add heading option to log functionsPeter Andersson
2016-11-29Remove left-over uses of -compile(export_all)Richard Carlsson
2016-10-24Fix problem with printouts to incorrect parent group leaderPeter Andersson
2016-09-13Export functions for setting and reading verbosityPeter Andersson
2016-08-30make, ct_make: Handle warning attributes in source filesBjörn Gustavsson
epp learned to handle the -warning() directive in 14d72f02, but make and ct_make were not updated to expect a {warning,_} return value from epp:parse_erl_form/1.
2016-07-25Merge branch 'maint-18' into maintRaimo Niskanen
Conflicts: OTP_VERSION erts/doc/src/notes.xml erts/vsn.mk lib/common_test/doc/src/notes.xml lib/common_test/vsn.mk lib/ssl/doc/src/notes.xml lib/ssl/src/ssl.appup.src lib/ssl/vsn.mk lib/stdlib/test/ets_SUITE.erl otp_versions.table
2016-07-23Fix error with duplicated printouts by ct_telnet:expect/3Peter Andersson
OTP-13730
2016-06-15Merge branch 'zandra/ct-dialyzer'Zandra Hird
* zandra/ct-dialyzer: ct_master_logs: Fix faulty error match
2016-06-14ct_master_logs: Fix faulty error matchZandra Hird
2016-06-14Merge branch 'peppe/common_test/OTP-13615'Peter Andersson
* peppe/common_test/OTP-13615: Fix problem with incorrect type of timestamps OTP-13615
2016-06-13Fix problem with incorrect type of timestampsPeter Andersson
OTP-13615
2016-06-13handle ct_slave nodename in the same way as net_kernelTristan Sloughter
Prior to this patch ct_slave:start/1 and /2 did not recognize the host part of a nodename (node@host) atom. This cause it to have different behaviour from net_kernel:start, requiring the hostname to be resolved instead of being able to be specified in the nodename argument.
2016-06-10Merge branch 'zandra/common_test/fix-ct_logs-crash-bug'Zandra Hird
* zandra/common_test/fix-ct_logs-crash-bug: Avoid crash when monitored ct_logs process is not responding
2016-06-10Avoid crash when monitored ct_logs process is not respondingZandra Hird
2016-06-09Merge branch 'zandra/common_test/unmatched_returns/OTP-13345'Zandra Hird
* zandra/common_test/unmatched_returns/OTP-13345: (23 commits) ct logs: Fix unmatched_return warnings ct_util: Fix unmatched_return warnings erl2html2: Fix unmatched_return warnings cth_conn_log: Fix unmatched_return warnings ct_webtool: Fix unmatched_return warnings ct_telnet: Fix unmatched_return warnings ct_ssh: Fix unmatched_return warnings ct_snmp: Fix unmatched_return warnings ct_slave: Fix unmatched_return warnings ct_rpc: Fix unmatched_return warnings ct_repeat: Fix unmatched_return warnings ct_release_test: Fix unmatched_return warnings ct_property_test: Fix unmatched_return warnings ct_master: Fix unmatched_return warnings ct_hooks_lock: Fix unmatched_return warnings ct_hooks: Fix unmatched_return warnings ct_groups: Fix unmatched_return warnings ct_ftp: Fix unmatched_return warnings ct_framework: Fix unmatched_return warnings ct_config: Fix unmatched_return warnings ...
2016-06-09ct logs: Fix unmatched_return warningsZandra
2016-06-07vts - Fix unmatched_return warningsZandra
2016-06-07test_server_sup - Fix unmatched_return warningsZandra
2016-06-07test_server_node - Fix unmatched_return warningsZandra Hird
2016-06-07test_server_io - Fix unmtached_return warningsZandra
2016-06-07test_server_gl - Fix unmatched_return warningsZandra