rad
3.0.0
|
Namespaces | |
gtlogcap | |
Functions | |
def | gtlogcap.gtlogcap_replace_gtmain (self) |
Remove google test/mock main libraries and replace with gtlogcap main library. More... | |
def | gtlogcap.gtlogcap_enable_globally (self) |
Method that enables gtlogcap globally, if configured to. More... | |
def | gtlogcap.gtlogcap_enable (conf) |
Enables gtlogcap feature. More... | |
def | gtlogcap.configure (conf) |
Simple waf tool that overrides use of google test main()
library with the gtlogcap library which provides a customized main()
that captures LOG4CPLUS logs and prints them if a test fails.
Enable this on selected taskgens by adding the feature gtlogcap
, or enable it for all test taskgens globally by invoking the configuration method gtlogcap_enable()
:
def configure(conf): conf.load("gtlogcap") conf.gtlogcap_enable() # optionally enable it globally
To opt-out on individual taskgens, set the attribute gtlogcap_enable=False
bld(..., gtlogcap_enable=False)
During configuration-phase:
gtlogcap
tool: The tool to load is gtlogcap
.
def configure(cnf): ... cnf.load("gtlogcap")
gtlogcap_enable()
: Enables "gtlogcap" feature on all taskgens with the "test" feature.
def configure(cnf): ... cnf.gtlogcap_enable()
GTLOGCAP_USELIB
: Control the use-var name for library to link to, when gtlogcap is enabled. This also disables automatic loading of the default gtlogcap library using wdep-name rad.gtlogcap
.
def configure(cnf): cnf.check_cfg(package="mygtlogcap", uselib_store"mygtlogcap", args='--cflags --libs') # Use a custom uselib name, which also disables discovery of the default library # that use the wdep name `rad.gtlogcap`. cnf.env.GTLOGCAP_USELIB = "mygtlogcap" cnf.load("gtlogcap")
gtlogcap_enable
attribute (default True): Allows explicit control when gtlogcap
is globally enabled. To disable on individual taskgen:
def build(bld): bld(..., gtlogcap_enable=False)