Age | Commit message (Collapse) | Author |
|
Before line numbers were included in exceptions (in R15), there were
parse transforms and macros that would keep the test_server_loc
process dictionary variable updated; therefore there is a mod_loc/1
function that will normalize the representation of locations.
Simplify the code as following:
* 'test_server_loc' should always contain a list with one or more
tuples. ({M,F} or {M,F,Line})
* At the beginning of each test case, set 'test_server_loc' to
[{Module,Func}] of the the currently executing test case.
* Stop updating 'test_server_loc', except when an exception occurs.
(It used to be updated when running 'init_per_testcase' and so on.)
* Remove the mod_loc/1 function.
|
|
Three pieces of information could be out of sync in testcase
supervisor process at the time when a timetrap occurred:
* test_server_loc (process dictionary) - may indicate that a
framework function is executing
* test_server_init_or_end_conf (process dictionary) - indicates whether
init_per_testcase or end_per_testcase is executing
* The current configuration (#st.config) - set using a synchronous
call
There could be in a crash in spawn_fw_call/7 because the current
configuration was not defined when it was expected to.
To avoid the problem, introduce set_tc_state/2 (and a corresponding
message) to allow setting both an indication what the testcase is
executing (e.g. init_per_testcase, framework call, and so on), and
the current configuration. Use only that information to handle
a timetrap timeout (and aborted testcase and the other reasons
for the testcase process to terminate). Completely remove
test_server_init_or_end_conf.
|
|
The Loc argument was use to determine the name of the currently
executing test case, in case that the M and F arguments did not
specify a test case.
Since a previous commit makes sure that the M and F arguments *are*
valied, we can eliminate the Loc argument.
|
|
The code is not actually shorter, but it avoids duplicating the code
for producing an error tuple when theres is no priv_dir tuple in
the config data.
|
|
Keeping all state as separate function arguments does not make it
easy to add more pieces of data to the state. Case in point is the
CurrConf argument where up to three separate items have been
shoehorned in.
Instead of the arguments, introduce a state record to hold all of the
different pieces of state (taking care to separate the former CurrConf
variable into separate fields in the record).
While at it, fix a bug. The name of the currently executing test
case (module and function) used to be stored in a tuple in the CurrConf
variable, and it would only be available after 'set_curr_conf' message
has been received. Depending on timing, it was possible in rare
circumstances for an EXIT signal to arrive before the 'set_curr_conf'
message. Avoid this problem by putting the current test case
name into the record from the beginning. That also means that we
can eliminate the workaround of getting the currently executing test case
from the stack trace using the get_mf/1.
|
|
|
|
|
|
|
|
|
|
|
|
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OTP-9988
|
|
* origin/peppe/common_test/otp-9666:
Set correct group leader for end_per_testcase process after tc timeout
OTP-9666
|
|
Also make sure that warnings about failure or timeout of end_per_testcase
(after a test case timeout) get printed in the test case log file.
OTP-9666
|
|
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.
|
|
* origin/peppe/common_test/otp-9904_9900:
Introduce error notification printout in the tc log
OTP-9904
OTP-9900
|
|
Also fix problem with parallel test cases printing "into each other"
(when using ct:print or ct:pal).
OTP-9904
OTP-9900
|
|
OTP-9958
|
|
* origin/peppe/common_test/otp-9855:
Ensure that comments always get printed in the overview log file
OTP-9855
|
|
OTP-9855
|
|
OTP-9930
|
|
|
|
OTP-9235
|
|
|
|
|
|
The log files should be independent of the Common Test installation.
|
|
Also make general improvements of presentation of results.
OTP-9706
|
|
* dev: (38 commits)
Update documentation
Rid ct_telnet of doc build warnings
Create temporary fix for problem with parallel test cases
Update primary bootstrap
Correct "Missing Suites" link
Add documentation on timetraps and start flags
Add missing tests for timetrap handling and fix remaining errors
Solve problem with ct_init/end_per_group being counted as test cases
Fix errors in test suites
Fix invalid call to undefined function
Fix problem with test_server_ctrl creating invalid conf test
Improve info in CT framework log
Update vsn.mk for common_test and test_server
Enhance logging performance
Change order of include files
Add link to last executed test suite on index page
Fix problem with location value when init config func calls help func
Fix crash when CTHook init fails
Correct error in test suite
Fix error with incorrect notification after end_per_testcase craches
...
Conflicts:
bootstrap/bin/start.boot
bootstrap/bin/start_clean.boot
bootstrap/lib/compiler/ebin/beam_asm.beam
bootstrap/lib/compiler/ebin/beam_disasm.beam
bootstrap/lib/compiler/ebin/compile.beam
bootstrap/lib/compiler/ebin/sys_pre_expand.beam
bootstrap/lib/kernel/ebin/code.beam
bootstrap/lib/kernel/ebin/code_server.beam
bootstrap/lib/kernel/ebin/hipe_unified_loader.beam
bootstrap/lib/kernel/ebin/inet.beam
bootstrap/lib/kernel/ebin/inet_config.beam
bootstrap/lib/kernel/ebin/inet_dns.beam
bootstrap/lib/stdlib/ebin/beam_lib.beam
bootstrap/lib/stdlib/ebin/dets.beam
bootstrap/lib/stdlib/ebin/erl_compile.beam
bootstrap/lib/stdlib/ebin/erl_internal.beam
bootstrap/lib/stdlib/ebin/erl_scan.beam
bootstrap/lib/stdlib/ebin/erl_tar.beam
bootstrap/lib/stdlib/ebin/io_lib_fread.beam
bootstrap/lib/stdlib/ebin/otp_internal.beam
bootstrap/lib/stdlib/ebin/sofs.beam
bootstrap/lib/stdlib/ebin/supervisor.beam
bootstrap/lib/stdlib/ebin/zip.beam
lib/common_test/src/ct.erl
lib/common_test/src/ct_run.erl
lib/common_test/test/ct_error_SUITE.erl
lib/common_test/test/ct_repeat_1_SUITE.erl
lib/common_test/test/ct_skip_SUITE.erl
lib/test_server/src/test_server.erl
|
|
OTP-9600
|
|
OTP-9593
|
|
|
|
|
|
|
|
OTP-9397
|
|
OTP-9501
|
|
OTP-9398: Fix error with end_tc being called with incorrect Suite argument after timeout in lib function
OTP-9397: Fix problem with true error not reported to FW
|
|
OTP-9397
|
|
OTP-9237
|
|
OTP-9379
|
|
Showing the line number of fail/{1,2} in the test_server module
is not especially useful.
|
|
Remove the old kludgy parse transformations and line numbers
macros in common_test and test_server, and use the line numbers
in exceptions instead.
|
|
|
|
1. ct:timetrap(infinity) not supported.
2. Previous set timetrap for a test case is not cancelled by new one.
|
|
init_per_testcase.
|