aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_logs.erl
AgeCommit message (Collapse)Author
2016-05-10ct_logs: Eliminate dialyzer warningsBjörn Gustavsson
common_test uses its own IO server that is group leader for the test case processes. By default, the IO server escapes characters with significance to HTML (e.g. '<'). In order to output HTML tags directly, the IO server must be told not to escape the output. The way to tell the IO server is to wrap the format string like this: ["$ct_html",Format] That works with common_test's own IO server, but in general not with other IO servers. Dialyzer will rightly complain that the call breaks the contract for io:format/3. To avoid the Dialyzer warning, we must obscure the wrapping of the format string. While we are at it, also refactor print_style/4 to make the code somewhat cleaner and shorter.
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-02Add flag/option for disabling the character escaping functionalityPeter Andersson
OTP-13537
2016-05-02Fix problem with stylesheet tags getting escapedPeter Andersson
OTP-13536
2016-05-02Tweak pre_post_io test case to run without failingPeter Andersson
2016-05-02Fix various log related problemsPeter Andersson
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-03-24Add blank before dotsStefan Strigler
This helps selecting the generated files by double clicking.
2016-03-15update copyright-yearHenrik Nord
2016-03-09Fix minor issues with escaping charactersPeter Andersson
OTP-13003
2016-03-08Fix problems with formatted test_server printoutsPeter Andersson
2016-03-08Make sure special characters are escaped in e.g. pal and log printoutsPeter Andersson
2015-06-18Change license text to APLv2Bruce Yinhe
2015-04-16Improve error reports in log when suite compilation failsPeter Andersson
2015-04-10Fix error in ct_logs, not handling long names correctlyPeter Andersson
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-12Fix problem with directories not listed in expected orderPeter Andersson
2015-02-16Make it possible to print in the test case log from on_tc_* hook funcsPeter Andersson
OTP-12468
2014-10-17Solve memory consumption problemPeter Andersson
2014-10-13Fix problem with buffered async io messages executed too latePeter Andersson
2014-10-08Don't generate weird exit if ct_logs has terminated before shut downPeter Andersson
2014-06-16Merge branch 'peppe/common_test/ct_basic_html_error' into maintPeter Andersson
* peppe/common_test/ct_basic_html_error: Fix problem with mismatching html tags when running basic_html log mode OTP-11917
2014-06-16Merge branch 'peppe/common_test/ct_log_cache_error' into maintPeter Andersson
* peppe/common_test/ct_log_cache_error: Force CT log cache to rescan entries with incomplete results OTP-11988
2014-06-05Improve cover analysis via common_testSiri Hansen
This addresses several bugs in common_test (ct) when using the cover analysis mechanism: In a ct test run, one can give a cover spec file which indicates that cover analysis shall be run, including a number of modules and a number of nodes. During the ct test run, multiple jobs may be started in test_server, and when the cover option is used, test_server would cover compile and analyse all given modules for each job. This commit instead allows the compilation and analysis to be explicitly ordered by ct for each test run. This way each module will only be cover compiled and analysed once. The cover log will be located in the common_test log directory (ct_run.<timestamp>), and the "Coverage log" link in each suite.log.html will point to this file. A new button is also added in the top level ct index file, which points to the cover log. This change also reduces the need of using the 'export' and 'import' options, since there is no longer any need to accumulate cover data over multiple test_server jobs. However, these options may still be used for importing and exporting cover data in order to store or accumulate data from multiple ct test runs. The 'nodes' option was earlier only used by ct to start cover on the given nodes before starting the first test_server job. After this job was completed, test_server would stop cover completely and then start it again for the next job without any knowledge of the 'nodes' options. For the next test_server jobs cover would therefore no longer be running on these nodes. Explcit calls to ct_cover:add_nodes had to be done in order to collect data through all test_server jobs. This bug has now been solved, since cover is no longer stopped between each test_server job. Finally, ct no longer stores cover data using ct_util:set_testdata. This was earlier used by ct_cover:add_nodes to make sure no node was added twice.This did, however, cause some problems when ct and cover were out of sync. ct could belive that a node was running cover and thus reject adding this node, while in reality cover had been stopped on the node (e.g. by test_server) so no cover data was collected. ct_cover:add_nodes will now instead use cover:which_nodes to check if a node is already running.
2014-06-03Fix problem with mismatching html tags when running basic_html log modePeter Andersson
2014-06-03Force CT log cache to rescan entries with incomplete resultsPeter Andersson
2014-02-14Fix edoc usage errorsPierre Fenoll
Errors discovered using `erldocs`: Superfluous @hidden tag would exit edoc application; 'Multiple @spec tag': appended a @clear tag after macro condition; '@spec arity does not match': added missing argument.
2013-11-18Fix problems with info functions and add more testsPeter 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-09-02Introduce pre- and post-test i/o logPeter Andersson
2013-06-28Make the CT logger print to stdout if test_server is not runningPeter Andersson
OTP-11176
2013-06-27Allow calls to ct:pal and ct:print even if CT is not runningPeter Andersson
Also make sure calls to ct:log and ct:pal don't cause crash if test_server is not running (could happen during startup or shutdown of CT). OTP-11176
2013-04-24Merge branch 'peppe/common_test/ts_logfile_problems' into maintPeter Andersson
* peppe/common_test/ts_logfile_problems: Fix error with refreshing logs when html util files are missing Add correct footer to last run index page Make test_server close log files properly and include correct footer
2013-04-22Fix error with refreshing logs when html util files are missingPeter Andersson
OTP-11046
2013-04-22Add correct footer to last run index pagePeter Andersson
OTP-11046
2013-04-18Merge branch 'siri/ct/error-printout-link/OTP-11044' into maintSiri Hansen
* siri/ct/error-printout-link/OTP-11044: [common_test] Add link from red error notification to full error description [common_test] Use max importance when logging errors
2013-04-17Bug fixes in Common Test log cachePeter Andersson
2013-04-17Merge branch 'peppe/common_test/log_cache' into maintPeter Andersson
* peppe/common_test/log_cache: Implement cache for the CT logger OTP-10855
2013-04-17Implement cache for the CT loggerPeter Andersson
OTP-10855
2013-04-16[common_test] Use max importance when logging errorsSiri Hansen
This commit adds ?MAX_IMPORTANCE to error notifications in the test case log, and it makes sure that the printout says "CT Error Notification". Printouts from cth_log_redirect (sasl and error_reports) uses ?STD_IMPORTANCE and states "System" in the printout.
2013-04-08[common_test] Send unexpected logging to test_server's unexpected_io.logSiri Hansen
If it could not be decided which test case a certain log printout belonged to, the common test framework log was earlier used. Such printouts are now instead sent to unexpected_io.log in test_server so that there is only one place to look for "missing" printouts.
2013-02-19Merge remote branch 'origin/peppe/common_test/force_stop'Peter Andersson
* origin/peppe/common_test/force_stop: Repair broken force_stop functionality OTP-10832
2013-02-18Repair broken force_stop functionalityPeter Andersson
2013-02-15Solve problem with IO deadlock in 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.
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.
2012-08-23Fix IO bug causing CT Hooks to hang at startupPeter Andersson
2012-08-23Merge remote branch 'origin/peppe/common_test/break_and_continue' into maintPeter Andersson
* origin/peppe/common_test/break_and_continue: Fix error in documentation Implement support for test case execution break/continue Conflicts: lib/common_test/src/ct.erl lib/common_test/src/ct_run.erl OTP-10127 OTP-10172