aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src
AgeCommit message (Collapse)Author
2012-09-28[common_test] Added tests and corrected bugs in ct_snmpSiri Hansen
OTP-10454 OTP-10434 Function register_users/2, register_agents/2 and register_usm_users/2, and the corresponding unregister_*/1 functions were not executable. These are corrected/rewritten. Function update_usm_users/2 is removed, and an unregister function is added instead. Update can now be done with unregister_usm_users and then register_usm_users. Functions unregister_*/2 are added, so specific users/agents/usm users can be unregistered. Function unload_mibs/1 is added. Overriding configuration files did not work, since the files were written in priv_dir instead of in the configuration dir (priv_dir/conf). This has been corrected. Minor updates to documentation.
2012-09-26Merge branch 'bjorn/common_test/dialyzer-fixes'Björn Gustavsson
* bjorn/common_test/dialyzer-fixes: ct_master_logs: Don't use io:format/3 with an empty variable list common_test: Don't use undocumented features of io:format()
2012-09-24Merge branch 'siri/common_test/undefined-snmp-funcs/OTP-10088'Siri Hansen
* siri/common_test/undefined-snmp-funcs/OTP-10088: [common_test] Moved ct_snmp_SUITE into data dir and run as other ct tests [common_test] Updated (minimized) config for ct_snmp test after fixing bugs [common_test] Use ct_snmp 'agent_vsns' config value in snmp app config [common_test] Change NotifType to atom instead of string [common_test] Remove calls to undefined functions from ct_snmp [common_test] Add minor test suite for ct_snmp Conflicts: lib/common_test/test/Makefile
2012-09-21[common_test] Use ct_snmp 'agent_vsns' config value in snmp app configSiri Hansen
OTP-10432 Config parameter 'agent_vsns' in ct_snmp was ONLY used in call to snmp_config:write_agent_snmp_files. There it is only used for deciding if usm config shall be written (if v3 is included) or not. The value of 'agent_vsns' was NOT added to the snmp application's agent configuration, so the snmp application's own default value would be used - this is [v1,v2,v3]. The result was that if v3 was not included in 'agent_vsns', then usm.conf was not written, but when starting the agent it would complain that this file did not exist since snmp's default versions are all [v1,v2,v3]. This has been corrected - the 'agent_vsns' value is now inserted in the snmp application agent configuration as {versions,AgentVsns}.
2012-09-21[common_test] Change NotifType to atom instead of stringSiri Hansen
OTP-10432 In call to snmp_config:write_agent_snmp_files, the NotifType argument was earlier a string. This has been changed to an atom since it failed in snmp application and notify�conf was not created.
2012-09-20[common_test] Remove calls to undefined functions from ct_snmpSiri Hansen
2012-09-20ct_master_logs: Don't use io:format/3 with an empty variable listBjörn Gustavsson
It is bad practice to use an arbitrary string as a format string for io:format(), since it could contain a '~' character which could trigger a badarg exception. Therefore, replace all io:format/3 calls that looks like: io:format(Fd, String, []) with: io:put_chars(Fd, String)
2012-09-20common_test: Don't use undocumented features of io:format()Björn Gustavsson
The Format string argument for io:format() is not documented to accept an iolist, so we should not depend on it. Also, it is bad practice to use an arbitrary string as a format string for io:format(), since it could contain a '~' character which could trigger a badarg exception. Fix both problems at the same time by using io:put_chars() to display the iolist.
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-10Fix broken interactive modePeter Andersson
2012-08-31Update copyright yearsBjörn-Egil Dahlberg
2012-08-30Fix documentation errorPeter Andersson
2012-08-29Update the documentation for R15B02Peter Andersson
OTP-10050 OTP-10069 OTP-10072 OTP-10087 OTP-9865 OTP-10049 OTP-10089 OTP-10145 OTP-9896 OTP-10135 OTP-10067 OTP-9625 OTP-10127 OTP-10172 OTP-10248 OTP-9625 OTP-10086
2012-08-28Merge remote branch 'origin/peppe/common_test/break_cont_error' into maintPeter Andersson
* origin/peppe/common_test/break_cont_error: Make sure the test can never hang when ct:break/1/2 is called
2012-08-27Make sure the test can never hang when ct:break/1/2 is calledPeter Andersson
2012-08-27Merge branch 'siri/common_test/ct_netconfc/OTP-10025' into maintSiri Hansen
* siri/common_test/ct_netconfc/OTP-10025: [common_test] Close log files when deleting ct_conn_log_h error handler
2012-08-27Merge remote branch 'origin/peppe/common_test/misc_test_failures' into maintPeter Andersson
* origin/peppe/common_test/misc_test_failures: Solve problem with registering parallel testcases
2012-08-27Merge remote branch 'origin/peppe/common_test/bad_func_spec' into maintPeter Andersson
* origin/peppe/common_test/bad_func_spec: Fix error in function specification
2012-08-27Merge remote branch 'origin/peppe/common_test/silent_connection_testspec' ↵Peter Andersson
into maint * origin/peppe/common_test/silent_connection_testspec: Add silent_connections term to test specification
2012-08-27Merge branch 'lukas/common_test/deep_get_config/OTP-9626' into maintLukas Larsson
* lukas/common_test/deep_get_config/OTP-9626: Add more cross reference links to ct docs Remove config option from common_test args Update user config to use nested tuple keys
2012-08-24[common_test] Close log files when deleting ct_conn_log_h error handlerSiri Hansen
Due to a bad pattern matching in ct_conn_log_h:terminate/1, log files were not closed when error handler was deleted. This has been corrected.
2012-08-24Merge branch 'siri/common_test/ct_netconfc/OTP-10025' into maintSiri Hansen
* siri/common_test/ct_netconfc/OTP-10025: [common_test] Handle all ssh_cm messages in ct_netconfc:handle_msg/2
2012-08-24Solve problem with registering parallel testcasesPeter Andersson
2012-08-24Add silent_connections term to test specificationPeter Andersson
2012-08-23Fix error in function specificationPeter Andersson
2012-08-23Merge remote branch 'origin/peppe/common_test/parallel_testcases_error' into ↵Peter Andersson
maint * origin/peppe/common_test/parallel_testcases_error: Solve problems with verbosity levels and parallel test cases
2012-08-23Solve problems with verbosity levels and parallel test casesPeter Andersson
2012-08-23Fix IO bug causing CT Hooks to hang at startupPeter Andersson
2012-08-23Merge remote branch 'origin/peppe/common_test/silent_connection' into maintPeter Andersson
* origin/peppe/common_test/silent_connection: Fix deadlock problem in connection handling Implement silent_connection for ssh Conflicts: lib/common_test/src/ct_gen_conn.erl OTP-9625
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
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-23Add more cross reference links to ct docsLukas Larsson
2012-08-23Update user config to use nested tuple keysLukas Larsson
ct:get_config and ct:require can now use nested tuples to fetch data from user configuration. E.g. ct:get_config({localhost,ip,v4}). This introduces a backwards incompatability with how names are associated with keys when using require/2. E.g. ct:require(a_name,{localhost,ip}) will associate a_name with ip instead of localhost.
2012-08-23Merge remote branch 'origin/peppe/common_test/testspec_updates' into maintPeter Andersson
* origin/peppe/common_test/testspec_updates: Test new testspec functionality and correct bugs Implement constants and new features for test specifications Conflicts: lib/common_test/src/ct_run.erl lib/common_test/test/Makefile OTP-10049 OTP-10089 OTP-10145
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-08-23Merge branch 'peppe/common_test/table_sorter' into maintPeter Andersson
* peppe/common_test/table_sorter: Fix installation of javascript files on windows Fix installation of javascript files Make it possible to sort the HTML tables Conflicts: lib/common_test/src/ct_util.hrl OTP-9896
2012-08-23Merge remote branch 'origin/peppe/common_test/exit_status' into maintPeter Andersson
* origin/peppe/common_test/exit_status: Implement support for returning valid exit status from ct_run OTP-9865 OTP-10087
2012-08-23Merge remote branch 'origin/peppe/common_test/ct_hooks_errors' into maintPeter Andersson
* origin/peppe/common_test/ct_hooks_errors: Fix IO printout crash caused by hook function Fix timetrap error in pre-hooks Conflicts: lib/common_test/src/cth_surefire.erl OTP-10050 OTP-10069 OTP-10072
2012-08-21Fix error in documentationPeter Andersson
2012-08-21Test new testspec functionality and correct bugsPeter Andersson
OTP-10049 OTP-10089
2012-08-21Implement constants and new features for test specificationsPeter Andersson
OTP-10049 OTP-10089
2012-08-20[common_test] Handle all ssh_cm messages in ct_netconfc:handle_msg/2Siri Hansen
Only {data,...} and {closed,...} was handled, which caused the test to fail with with a function_clause crash in ct_netconfc when {exit_status,...} was received. This has been corrected.
2012-08-17[common_test] Don't abort test if opening of connection failsSiri Hansen
When opening a connection, the connection process would link itself to ct_util_server before calling the init callback, e.g. in ct_netconfc, ct_telnet etc. If the init callback failed, then ct_util_server would get the 'EXIT'. ct_util looks up the pid in the connection table, but since the connection is not yet registered it is not found. ct_util does not know which process it is and will thus die - aborting the complete test run. This commit moves the link(CtUtilServer) after the init callback, so a crash in the init callback will not be detected by ct_util_server - the caller process, however, will get a 'DOWN' message due to monitoring and ct_gen_conn:start will give an error return.
2012-08-17[common_test] Don't allow named (required) connection to be opened twiceSiri Hansen
Earlier, it was possible to open connection (ct_gen_conn) with the same (required) name twice, which could give unexpected results. Such attempts will now return {error,{connection_exists,OtherClient}}.
2012-08-17[common_test] Don't abort test run if connection process crashesSiri Hansen
Earlier ct_util_server would terminate and thus abort the complete test run if a connection process (ct_gen_conn) crashed. This is now changed so that ct_util will only print an error report (in the test case log) and continue the rest of the test.
2012-08-17[common_test] Add netconf client, ct_netconfcSiri Hansen
The netconf client supports basic netconf functionality over SSH. In order to allow testing of both success and failure cases, it is intentionally written to allow non-standard behavior. In order for the netconf client to use the generic connection mechanism in common_test, ct_gen_conn has been updated to be more flexible: Added options: {reconnect,bool()} {forward_messages,bool()} {use_existing_connection,bool()} Allow handle_msg to return {reply,Reply,State} | {noreply,State} | {stop,Reply,State} If forward_messages==true, the ct_gen_conn callback must also implement: handle_msgs(Msg,State) -> {noreply,State} | {stop,State}
2012-08-08Implement support for test case execution break/continuePeter Andersson
2012-08-08Fix doc build errorPeter Andersson
2012-07-19Merge branch 'lukas/common_test/surefire_fix_skipped_end/OTP-10158' into maintLukas Larsson
* lukas/common_test/surefire_fix_skipped_end/OTP-10158: Fix bug where auto skipped tcs would disappear Allow non configlist returns from other cths Fix close of suite when end_per_suite is skipped
2012-07-19Add ct:notify and ct:sync_notifyLukas Larsson