ct_master(3erl)
π NAME π
Bestie, welcome to the ct_master page from the common_test manual β yes, the distributed-test-execution-control one. π
ct_master β Distributed test execution control for Common Test.
π¦ DESCRIPTION π¦
Distributed test execution control for Common Test.
This module exports functions for running Common Test nodes on multiple hosts in parallel. Literally the group-chat energy for making a bunch of hosts run tests at the same time. β¨
β¨ EXPORTS β¨
Okay so hereβs every export, no skips, no cap. π«Ά
abort() -> ok
Stops all running tests. All of them. Like, the whole party. π
abort(Nodes) -> ok
Types:
Nodes = atom() | [atom()]
Stops tests on specified nodes.
basic_html(Bool) -> ok
Types:
Bool = true | false
If set to true, the ct_master logs are written on a primitive HTML format, not using the Common Test CSS style sheet. Itβs giving bare-bones HTML realness. π
get_event_mgr_ref() -> MasterEvMgrRef
Types:
MasterEvMgrRef = atom()
Gets a reference to the Common Test master event manager. The reference can be used to, for example, add a user-specific event handler while tests are running.
Example:
gen_event:add_handler(ct_master:get_event_mgr_ref(), my_ev_h, [])
progress() -> [{Node, Status}]
Types:
Node = atom()
Status = finished_ok | ongoing | aborted | {error, Reason}
Reason = term()
Returns test progress. If Status is ongoing, tests are running on the node and are not yet finished. So close, bestie, but not done yet. π
run(TestSpecs) -> ok
Types:
TestSpecs = string() | [SeparateOrMerged]
Equivalent to ct_master:run(TestSpecs, false, [], []).
run(TestSpecs, InclNodes, ExclNodes) -> ok
Types:
TestSpecs = string() | [SeparateOrMerged]
SeparateOrMerged = string() | [string()]
InclNodes = [atom()]
ExclNodes = [atom()]
Equivalent to ct_master:run(TestSpecs, false, InclNodes, ExclNodes).
run(TestSpecs, AllowUserTerms, InclNodes, ExclNodes) -> ok
Types:
TestSpecs = string() | [SeparateOrMerged]
SeparateOrMerged = string() | [string()]
AllowUserTerms = bool()
InclNodes = [atom()]
ExclNodes = [atom()]
Tests are spawned on the nodes as specified in TestSpecs. Each specification in TestSpec is handled separately. However, it is also possible to specify a list of specifications to be merged into one specification before the tests are executed. Any test without a particular node specification is also executed on the nodes in InclNodes. Nodes in the ExclNodes list are excluded from the test. Read that twice if you need to β itβs important, fr fr.
run_on_node(TestSpecs, Node) -> ok
Types:
TestSpecs = string() | [SeparateOrMerged]
SeparateOrMerged = string() | [string()]
Node = atom()
Equivalent to ct_master:run_on_node(TestSpecs, false, Node).
run_on_node(TestSpecs, AllowUserTerms, Node) -> ok
Types:
TestSpecs = string() | [SeparateOrMerged]
SeparateOrMerged = string() | [string()]
AllowUserTerms = bool()
Node = atom()
Tests are spawned on Node according to TestSpecs. One node, one vibe, all the specs. π¦
run_test(Node, Opts) -> ok
Types:
Node = atom()
Opts = [OptTuples]
OptTuples = {config, CfgFiles} | {dir, TestDirs} | {suite,
Suites} | {testcase, Cases} | {spec, TestSpecs} |
{allow_user_terms, Bool} | {logdir, LogDir} | {event_handler,
EventHandlers} | {silent_connections, Conns} | {cover,
CoverSpecFile} | {cover_stop, Bool} | {userconfig,
UserCfgFiles}
CfgFiles = string() | [string()]
TestDirs = string() | [string()]
Suites = atom() | [atom()]
Cases = atom() | [atom()]
TestSpecs = string() | [string()]
LogDir = string()
EventHandlers = EH | [EH]
EH = atom() | {atom(), InitArgs} | {[atom()], InitArgs}
InitArgs = [term()]
Conns = all | [atom()]
Tests are spawned on Node using ct:run_test/1. Thatβs the whole function, iconic and done. π
Footer vibes, bestie: this page is from Ericsson AB, itβs common_test 1.24.0.1, and the date slot is giving mystery β so thatβs the cute sign-off. π
π
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms