From 378da5aef27e1679aa30b8f4a2a6569accb70ff2 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 24 Oct 2017 16:24:18 +0200 Subject: Add tests and doc for the new remaining_test_procs function --- lib/common_test/doc/src/ct.xml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'lib/common_test/doc/src/ct.xml') diff --git a/lib/common_test/doc/src/ct.xml b/lib/common_test/doc/src/ct.xml index 1a3cfdb0c5..afd8741cd1 100644 --- a/lib/common_test/doc/src/ct.xml +++ b/lib/common_test/doc/src/ct.xml @@ -1060,6 +1060,42 @@ + + remaining_test_procs() -> {TestProcs,SharedGL,OtherGLs} + >This function will return the identity of test- and group + leader processes that are still running at the time of this call. + + TestProcs = [{pid(),GL}] + GL = pid() + SharedGL = pid() + OtherGLs = [pid()] + + +

This function will return the identity of test- and group + leader processes that are still running at the time of this call. + TestProcs are processes in the system that have a Common Test IO + process as group leader. SharedGL is the central Common Test + IO process, responsible for printing to log files for configuration + functions and sequentially executing test cases. OtherGLs are + Common Test IO processes that print to log files for test cases + in parallel test case groups.

+

The process information returned by this function may be + used to locate and terminate remaining processes after tests have + finished executing. The function would typically by called from + Common Test Hook functions.

+

Note that processes that execute configuration functions or + test cases are never included in TestProcs. It is therefore safe + to use post configuration hook functions (such as post_end_per_suite, + post_end_per_group, post_end_per_testcase) to terminate all processes + in TestProcs that have the current group leader process as its group + leader.

+

Note also that the shared group leader (SharedGL) must never be + terminated by the user, only by Common Test. Group leader processes + for parallel test case groups (OtherGLs) may however be terminated + in post_end_per_group hook functions.

+
+
+ remove_config(Callback, Config) -> ok Removes configuration variables (together with -- cgit v1.2.3