aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/src/test_server_ctrl.erl
AgeCommit message (Collapse)Author
2013-09-02Introduce pre- and post-test i/o logPeter Andersson
2013-08-28Remove the obsolete test_server_h error handlerPeter Andersson
2013-04-19Make test_server close log files properly and include correct footerPeter Andersson
OTP-11046
2013-03-14Merge branch 'siri/cuddle-with-tests' into maintSiri Hansen
* siri/cuddle-with-tests: [sasl] Fix tests that compare execution time [jinterface] Kill process between tests to avoid consequential error [jinterface] Make tests handle space in path on windows [common_test] Extend timers for slave nodes in ct_cover_SUITE [test_server] Clean up unused code in test_server_SUITE [reltool] Increase timetrap timeout for reltool_server_SUTIE to 10 minutes [test_server] Fix encoding of HTML file references to work on windows [test_server] Use simpler tc name in unicode test to make it work on windows
2013-03-04[test_server] Remove unused code related to remote targetsSiri Hansen
After removing the functionality for remote target nodes in R16A, there was still some unused code left and some documentation that was not updated. This is now completed.
2013-03-04[test_server] Fix encoding of HTML file references to work on windowsSiri Hansen
The URI encoding when in unicode file name mode did not preserve @, : and /, and thus some links were did not work on windows (think c:/). This has been corrected.
2013-02-18Repair broken force_stop functionalityPeter Andersson
2013-02-04[test_server] Don't write unicode strings to latin1 log filesSiri Hansen
The unicode update of test_server for R16A introduced a few potential errors when logging to files. Sometimes ~tp or ~ts was used for formatting also when writing to files that were not opened with the {encoding,utf8} option. If then the argument contained unicode characters above 255, the file descriptor would crash. This has been corrected by the following modifications: * Since the 'unexpected_io' log file is used only when the test case HTML file is not available (e.g. between test cases), this file is now also a HTML file and as other test_server HTML logs it is always UTF-8 encoded * Since it is possible to change which information is going to which log file (with test_server_ctrl:set_levels/3), we do not have full control over which information is written to which file. This means that any printout could be written to the 'major' log file (suite.log), which was earlier encoded as latin1. To avoid crashing this file descriptor due to unicode strings, the 'major' log file is now also encoded in UTF-8 (possible incopatibility). * The cross_cover.info file is no longer a text file which can be read with file:consult/1, instead it is written as a pure binary file using term_to_binary when writing and binary_to_term when reading. * The encoding of the file named 'last_name', which only content is the path to the last run.<timestamp> directory, is now dependent on the file name mode of the VM. If file names are expected to be unicode, then the 'last_name' file is UTF-8 encoded, else it is latin1 encoded. Also, ~tp is changed back to ~p unless it is somehow likely that the argument includes strings. It is not obvious that this is the correct thing to do, but some decission had to be taken...
2013-01-25[test_server] Don't escape : and @ in test log linksSiri Hansen
If escaping :, then links of type "file:///c:/ldisk..." will not work. Escaping @ does not create any problems, but the link becomes harder to read and most modern browsers can handle this.
2013-01-25[test_server] Ensure correct encoding in header for erl2html2:convertSiri Hansen
When running under framework common_test, the encoding statement in the HTML header of the file generated with erl2html2:convert would sometimes be faulty. This has been corrected.
2013-01-25[test_server] Update test_server 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, allowing both special characters like "/", "&", "?" etc, and latin1 or unicode characters. * Use unicode modifier 't' with ~s and ~p 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.
2013-01-10Merge branch 'siri/cross-cover/OTP-9870'Siri Hansen
* siri/cross-cover/OTP-9870: [test_server] Don't use print/3 in cross_cover_analyse [common_test] Add documentation for cross cover analysis [common_test] Add test case for cross cover mechanism [test_server] Update documentation about cross cover [test_server] Add test of code cover mechanism [test_server,common_test] Fix cross cover mechansim
2013-01-09test_server: Remove support for packagesBjörn Gustavsson
2012-12-13[test_server] Don't use print/3 in cross_cover_analyseSiri Hansen
Cross cover analysis is executed outside the scope of test_server_ctrl, i.e. test_server_ctrl is not necessarily started. This may cause test_server_ctrl:print/3 to hang. Instead use io:fwrite directly (as it was before).
2012-12-04[test_server,common_test] Fix cross cover mechansimSiri Hansen
Update the interface for cross cover analysis (collection of cover data over multiple tests) so it can be used via common_test and directly with test server. The concept of 'application' in the cross cover interface is removed and replaced with an arbitrary Tag=atom() which identifies a test run.
2012-11-19[test_server] Fix erl2html2.erl to handle badly indented filesSiri Hansen
Line numbering of erlang files that were not correctly indented could be wrong after coverting to html with erl2html2:convert/[2,3]. This has been corrected. This commit also fixes the following: * There are now link targets for each line and not only for each 10th line - meaning that links from test logs are now to the exact line, and not to the last number for which N rem 10 == 0. * there will only be one link target per function, i.e. the faulty link targets for function clauses are removed. * link targets for function now includes the arity (e.g. func/1 has a link target "func-1") And some tests are added.
2012-11-08Merge branch 'bjorn/ct/minor-corrections'Björn Gustavsson
* bjorn/ct/minor-corrections: test_server_io: Correct a few comments Handle ct:abort_current_testcase/1 when executing parallel groups Make sure that "Cover analysing..." is written to stdout Make sure that "Testing..." is not written if testing has finished
2012-11-08Remove stale support for remote target nodesBjörn Gustavsson
The support for remote target nodes has not worked in a long time. We are unlikely to ever need remot target node support and if we'll need it will be easier to start over from scratch.
2012-11-07Handle ct:abort_current_testcase/1 when executing parallel groupsBjörn Gustavsson
ct:abort_current_testcase/1 (which is a wrapper for the function with the same name in test_server_ctrl) would not work as expected when a group with parallel test cases was executing. Essentially, the abort_current_testcase message would be ignored until the group has finished and would then abort the end_per_group testcase for the group. Since there is no unique current testcase when a parallel group is executing, we must handle the abort_current_testcase message and return an error tuple. Also fix the bug that test_server_ctrl:abort_current_testcase/1 would always return 'ok'.
2012-11-07Make sure that "Testing..." is not written if testing has finishedBjörn Gustavsson
When writing messages to stdout, all messages are prefixed with "Testing" followed by the name of the test suite. We don't want to write that prefix if testing has stopped.
2012-11-07[test_server] Skip test cases if init_per_group fails in user timetrapSiri Hansen
'user_timetrap_error' was not detected during any "conf init function" except init_per_suite, so if e.g. init_per_group failed with user_timetrap_error, then the test cases in the group would not be skipped. This has been corrected.
2012-10-30[common_test] Add option cover_stopSiri Hansen
By default, test_server will always stop cover (and thus load back the non cover compiled original beam files) after a test with code coverage analysis is completed. The new option allows the common_test user to specify that cover shall not be stopped. This can be useful if there are processes still running old code, i.e. processes that have not done any fully qualified function call after the cover compilation, since loading the original code then will kill those processes. This is only recommended if the erlang node is to be stopped after the test run, or if cover can be manually stopped.
2012-10-30[test_server] Allow cross cover analysis when testing through common_testSiri Hansen
The cross cover analysis functionality in test_server was broken since OTP converted to running daily tests through common_test. This has been corrected.
2012-10-30[test_server] Multiply timers with timetrap_scale_factor when starting nodesSiri Hansen
In test_server_ctrl:start_node and wait_for_node, the timer in controller_call was not multiplied by the timetrap_scale_factor. This caused unexpected behaviour since the scale factor was used furhter down the the code, and timeout would happen in unexpected order when cover was running.
2012-10-26Merge branch 'bjorn/ct/separate-io-server/OTP-10101'Björn Gustavsson
* bjorn/ct/separate-io-server/OTP-10101: Test ct:capture/start/stop/get Introduce ct_group_leader_SUITE that does nasty things with group leaders Eliminate unexpected I/O to the minor log file Introduce test_server_io and test_server_gl Clean up initialization of parallel test cases Introduce is_io_buffered/0 to somewhat improve readability test_server_ctrl: Consistently use set_io_buffering/1
2012-10-25[test_server] Set data_dir correctly when suite is cover compiledSiri Hansen
If the test suite itself was included in code coverage analysis, then test_server_ctrl would not manage to set data_dir correctly for the test, since it relied on the result of code:which(Suite). This has been corrected.
2012-10-23Eliminate unexpected I/O to the minor log fileBjörn Gustavsson
2012-10-23Introduce test_server_io and test_server_glBjörn Gustavsson
2012-10-23Clean up initialization of parallel test casesBjörn Gustavsson
2012-10-23Introduce is_io_buffered/0 to somewhat improve readabilityBjörn Gustavsson
Note that there are some more direct use of: get(test_server_common_io_handler) that cannot be replaced with a call to is_io_buffered/0.
2012-10-23test_server_ctrl: Consistently use set_io_buffering/1Björn Gustavsson
Since we will want to change the implementation of I/O buffering in a future commit, make sure that all updates of the buffering state is done by calling set_io_buffering/1.
2012-10-01Merge branch 'bjorn/test_server/dialyzer-fixes'Björn Gustavsson
* bjorn/test_server/dialyzer-fixes: test_server_ctrl: Don't use undocumented features of io:format() Fix obsolete assumption for the return type of os:type/0
2012-09-27Merge branch 'dgud/ct/fix-trashed-logs/OTP-10369'Dan Gudmundsson
* dgud/ct/fix-trashed-logs/OTP-10369: [ct] Shorten testcase names Shorten testcase names [ct] Block output into single io call
2012-09-26test_server_ctrl: Don't use undocumented features of io:format()Björn Gustavsson
The Format string argument for io:format/3 is not documented to accept an iolist, so we should not depend on it. Fix the problem by using io:put_chars/2 instead.
2012-09-19[ct] Block output into single io callDan Gudmundsson
Add newlines to the same io function call, so that concurrent io always starts at a new line.
2012-09-19Teach test_server to report severe errors to common_testBjörn Gustavsson
If a severe error occurs in test_server (e.g. failing to write to log files), test_server would terminate without commont_test knowing about it. Since ct_run can now return an exit code, it is important that common_test is aware of severe problem so that it can indicate that an error has occurred.
2012-09-19test_server_ctrl: Present "cannot create log dir" errors more neatlyBjörn Gustavsson
2012-09-19test_server_ctrl: Don't die in stop_extra_tools/1Björn Gustavsson
If it is not possible for test_server_ctrl:start_log_file/0 to create the log file directory or log files, then stop_extra_tools/1 (called from init_tester/10) is also likely to crash and hide the original error reason. That will be confusing to the user. Therefore, catch the call to stop_extra_tools/1.
2012-08-23Merge branch 'maint'Peter Andersson
2012-08-23Merge remote branch 'origin/peppe/common_test/verbosity_level' into maintPeter Andersson
* origin/peppe/common_test/verbosity_level: Fix doc build error Implement verbosity levels and parameter for log printout importance Conflicts: lib/common_test/src/ct_logs.erl lib/common_test/src/ct_run.erl lib/common_test/src/ct_testspec.erl lib/common_test/src/ct_util.hrl lib/common_test/test/Makefile OTP-9625 OTP-10067
2012-08-23Merge branch 'maint'Peter Andersson
2012-07-19test_server: Remove VxWorksBjörn-Egil Dahlberg
2012-07-13Implement verbosity levels and parameter for log printout importancePeter Andersson
2012-07-06Make it possible to sort the HTML tablesPeter Andersson
OTP-9896 Introduce java scripts in the web pages to enable sorting of table elements.
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-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-19Run hooks for non-existing config functionsPeter Andersson
2012-03-13Change the option name 'unique_priv_dir' to 'create_priv_dir'Peter Andersson
The new values for create_priv_dir are: auto_per_run, auto_per_tc, manual_per_tc
2012-03-13Make it possible to use unique priv_dir namesPeter Andersson
Introduce the optional feature to have Test Server generate priv_dir directory names that are unique for each test case or config function. The name of the option/flag is 'unique_priv_dir' and it can be set to value 'auto' or 'manual'. If auto, Test Server creates each priv_dir automatically (can be expensive in case of many and/or repeated cases). If manual, the user needs to create the priv_dir explicitly by calling ct:make_priv_dir/0.