This class contains configuration for winIDEA connection and logging parameters. More...
#include <CTestEnvironmentConfig.h>
Public Types | |
| enum | EBreakpointsType { EKeepWinIDEASetting , EUseHWBPs , EUseSWBPs , EUseHWBPsForInitThenSWBPs } |
| These values define, how testIDEA sets breakpoints during initialization and testing. More... | |
| enum | EEnvConfigSections |
| Ids of test specification sections. | |
Public Member Functions | |
| virtual void | assign (const CTestObjectSPtr &base) |
| Assigns members of base to this. | |
| bool | containsSection (int section) const |
| Returns true, if the specified section exists for this object. | |
| virtual CTestObjectSPtr | copy () const |
| Creates a deep copy of this object. | |
| CTestBaseSPtr | createInstance (const CTestBaseSPtr &parent) const override |
| Creates a new empty instance of this class. | |
| CTestEnvironmentConfig (const CTestBaseSPtr &parent) | |
| Initializes new instance. | |
| std::string | getAddress () |
| Returns address of remote host running winIDEA. | |
| std::string | getAutoIdFormatString () |
| Returns string, which defines format of automatically assigned IDs. | |
| EBreakpointsType | getBreakpointType () |
| Returns the type of breakpoints to be used during testing. | |
| std::string | getClassName () const |
| std::string | getConfiguredCoreID (const std::string &testCaseCoreId) |
Returns the given testCaseCoreId, if it is not empty. | |
| virtual CTestTreeNodeSPtr | getContainerTestNode () |
| virtual CTestSpecificationSPtr getContainerTestSpec(); | |
| int | getCoreIdIndex (const std::string &coreId, bool isThrow) |
| Returns index of the given coreId. | |
| void | getCoreIds (iconnect::StrVector &coreIds) |
| Returns vector of core IDs. | |
| std::string | getDefaultReturnValueName () |
| Returns the default name for variable, where function return value is stored. | |
| int | getEnumTagValue (int section) |
| Returns value of enum type. | |
| isys::CEvaluatorConfigSPtr | getEvaluatorConfig (bool isConst) |
| Returns evaluator configuration. | |
| void | getLoggingParameters (iconnect::StrVector ¶ms) |
| Returns vector of logging parameters. | |
| CTestBaseSPtr | getParent () const |
| Returns parent. | |
| int | getPort () |
| Returns port of remote host running winIDEA. | |
| std::string | getPrimaryCoreId () |
| Returns core ID of the primary core (the first item from the list), or empty string is there are no core IDs specified. | |
| isys::CScriptConfigSPtr | getScriptConfig (bool isConst) |
| Returns script configuration. | |
| int | getSectionId (const std::string §ionName) |
| Returns section ID for the given section name. | |
| isys::CStackUsageConfigSPtr | getStackUsageConfig (bool isConst) |
| isys::CTestBaseListSPtr | getStackUsageOptions (bool isConst) |
| Returns list of stack usage options for all cores for which it is defined. | |
| std::string | getStopFunction () |
| CTestBaseSPtr | getTestBase (int section, bool isConst) |
| CTestBaseListSPtr | getTestBaseList (int section, bool isConst) |
| isys::CTestCaseTargetInitConfigSPtr | getTestCaseTargetInitConfig (bool isConst) |
| Returns target initialization before each test case configuration. | |
| CTestObject::ETestObjType | getTestObjType () const |
| Returns type of this object, which is CTestObject::ETestBase. | |
| int | getTestTimeout () |
| Returns timeout (in milliseconds), after which test execution is terminated. | |
| isys::CToolsConfigSPtr | getToolsConfig (bool isConst) |
| Returns tools configuration. | |
| std::string | getVersion () |
| Returns version of testIDEA which saved the test specification file. | |
| std::string | getWarnings () |
| If there were any warnings detected during parsing, this method returns non-empty string with description of warnings. | |
| std::string | getWorkspace () |
| Returns workspace file path and name. | |
| bool | isAlwaysRunInitSeqBeforeRun () |
| If true, init sequence is executed before test specifications are executed. | |
| bool | isAutoConnectToWinIDEA () |
| If true is returned, then Test Bench will connect automatically to winIDEA, when names of functions or global vars are required. | |
| bool | isCheckTargetStateBeforeRun () |
| Returns true, if testIDEA should check target state before running tests and warn user if it does not match state defined in this class, for example the target is not stopped on function 'main'. | |
| bool | isDeleteAllBPsOnInit () |
| bool | isDisableInterrupts () |
| Returns true, if interrupts should be disabled in init sequence. | |
| bool | isDownloadOnInit () |
| virtual bool | isEmpty () const |
| This method returns true, if the object contains no data. | |
| bool | isResetOnInit () |
| bool | isRunOnInit () |
| bool | isSectionEmpty (int sectionId) |
| Returns true, if the given section is empty. | |
| virtual bool | isSerializedAsList (bool isParsing) |
| Returns true if object should be serialized as list, for example CTestFunction. | |
| bool | isUseQualifiedFuncNames () |
| Returns true, if qualified function names should be presented as content proposals in testIDEA. | |
| bool | isVerifySymbolsBeforeRun () |
| Returns true, if testIDEA should verify that functions exist on target before test run. | |
| void | serialize (const isys::IEmitterSPtr &emitter) override |
| Overrides base class method to change file version. | |
| void | setAddress (const std::string &address) |
| void | setAlwaysRunInitSeqBeforeRun (iconnect::ETristate isAlwaysRunInitSeq) |
| If set to true, init sequence is run before each test start. | |
| void | setAutoConnectToWinIDEA (iconnect::ETristate autoConnect) |
| If set to true, then Test Bench will connect automatically to winIDEA, when names of functions or global vars are required. | |
| void | setAutoIdFormatString (const std::string &format) |
| Sets format of automatically assigned IDs. | |
| void | setBreakpointsType (EBreakpointsType breakpointsType) |
| Sets type of breakpoints to be used in testing. | |
| void | setCheckTargetStateBeforeRun (iconnect::ETristate isCheckTargetState) |
| Defines, if testIDEA should check target state before running tests. | |
| virtual void | setComment (int section, int idx, const std::string &nlComment, const std::string &eolComment) |
| void | setDefaultReturnValueName (const std::string &defaultRetValName) |
| Sets default name for variable, where function return value is stored. | |
| void | setDeleteAllBPsOnInit (iconnect::ETristate isDeleteAllBPs) |
| void | setDisableInterrupts (iconnect::ETristate isDisableInterrupts) |
| void | setDownloadOnInit (iconnect::ETristate isDownload) |
| void | setEnumTagValue (int section, int enumValue) |
| Sets value of enum type. | |
| void | setLoggingParameters (const std::string ¶ms) |
| Sets logging parameters. | |
| virtual void | setMainMapStyle (isys::IEmitter::EYamlStyle mappingStyle) |
| Sets style of the mapping for complete object. | |
| void | setParent (CTestBaseSPtr parent) |
| Sets parent. | |
| void | setPort (int port) |
| void | setResetOnInit (iconnect::ETristate isReset) |
| void | setRunOnInit (iconnect::ETristate isRun) |
| void | setStopFunction (const std::string &stopFunction) |
| void | setTestTimeout (int timeout) |
| Sets timeout (in milliseconds), after which test execution is terminated. | |
| void | setVerifySymbolsBeforeRun (iconnect::ETristate isVerifySymbols) |
| Defines, if testIDEA should verify symbols before test run. | |
| void | setVersion (const std::string &version) |
| Outputs contents of this class to emitter. | |
| void | setWorkspace (const std::string &workspace) |
| virtual std::string | toString () |
| Returns object data as YAML string. | |
Static Public Member Functions | |
| static CTestEnvironmentConfigSPtr | cast (const CTestBaseSPtr &testBase) |
| Casts the given object to this class. | |
| static std::string | getStaticVersion () |
| This method may be used by other classes during parsing to obtain version of currently parsed iyaml file. | |
Protected Member Functions | |
| void | setStaticTagsAsConst () |
| This method is called by all objects which are immediately contained in CTestSpecification, for example CTestCoverage, CTestHIL, ... | |
This class contains configuration for winIDEA connection and logging parameters.
These values define, how testIDEA sets breakpoints during initialization and testing.
| isys::CTestEnvironmentConfig::CTestEnvironmentConfig | ( | const CTestBaseSPtr & | parent | ) |
Initializes new instance.
| parent | an instance of parent CTestSpecification class. Used only when parsing YAML declaration. Can be specified as NULL if the object is not initialized by parser. |
|
virtualinherited |
|
static |
Casts the given object to this class.
Returns NULL if input is NULL.
| IllegalArgumentException | if input object is not instance of this class. |
|
inherited |
Returns true, if the specified section exists for this object.
|
virtualinherited |
Creates a deep copy of this object.
Parent is set.
|
overridevirtual |
| std::string isys::CTestEnvironmentConfig::getAddress | ( | ) |
Returns address of remote host running winIDEA.
If empty string is returned and port is 0, then local host is used.
| std::string isys::CTestEnvironmentConfig::getAutoIdFormatString | ( | ) |
Returns string, which defines format of automatically assigned IDs.
| EBreakpointsType isys::CTestEnvironmentConfig::getBreakpointType | ( | ) |
Returns the type of breakpoints to be used during testing.
|
inherited |
| std::string isys::CTestEnvironmentConfig::getConfiguredCoreID | ( | const std::string & | testCaseCoreId | ) |
Returns the given testCaseCoreId, if it is not empty.
If it is empty, the first item from envConfig core IDs is returned. If no core IDs are defined there, an empty string is returned.
|
virtualinherited |
virtual CTestSpecificationSPtr getContainerTestSpec();
| int isys::CTestEnvironmentConfig::getCoreIdIndex | ( | const std::string & | coreId, |
| bool | isThrow ) |
Returns index of the given coreId.
| void isys::CTestEnvironmentConfig::getCoreIds | ( | iconnect::StrVector & | coreIds | ) |
Returns vector of core IDs.
If empty, single core is used with empty string as its ID.
| std::string isys::CTestEnvironmentConfig::getDefaultReturnValueName | ( | ) |
Returns the default name for variable, where function return value is stored.
|
inherited |
Returns value of enum type.
| isys::CEvaluatorConfigSPtr isys::CTestEnvironmentConfig::getEvaluatorConfig | ( | bool | isConst | ) |
Returns evaluator configuration.
| void isys::CTestEnvironmentConfig::getLoggingParameters | ( | iconnect::StrVector & | params | ) |
Returns vector of logging parameters.
Parameters are stored in the list in the following order: logFileName, logObjPrefix. All parameters are optional. If none of them is specified, logging is off.
|
inherited |
Returns parent.
| int isys::CTestEnvironmentConfig::getPort | ( | ) |
Returns port of remote host running winIDEA.
If 0 is returned and address is empty string, then local host is used.
| std::string isys::CTestEnvironmentConfig::getPrimaryCoreId | ( | ) |
Returns core ID of the primary core (the first item from the list), or empty string is there are no core IDs specified.
| isys::CScriptConfigSPtr isys::CTestEnvironmentConfig::getScriptConfig | ( | bool | isConst | ) |
Returns script configuration.
|
inherited |
Returns section ID for the given section name.
| isys::CStackUsageConfigSPtr isys::CTestEnvironmentConfig::getStackUsageConfig | ( | bool | isConst | ) |
Returns configuration for stack usage measurements.
| isys::CTestBaseListSPtr isys::CTestEnvironmentConfig::getStackUsageOptions | ( | bool | isConst | ) |
Returns list of stack usage options for all cores for which it is defined.
|
static |
This method may be used by other classes during parsing to obtain version of currently parsed iyaml file.
If the version was not parsed, empty string is returned.
| std::string isys::CTestEnvironmentConfig::getStopFunction | ( | ) |
Returns the name of the function to stop on in init sequence. Has no effect if isRunOnInit() returns false.
|
inherited |
|
inherited |
| isys::CTestCaseTargetInitConfigSPtr isys::CTestEnvironmentConfig::getTestCaseTargetInitConfig | ( | bool | isConst | ) |
Returns target initialization before each test case configuration.
|
inherited |
Returns type of this object, which is CTestObject::ETestBase.
| int isys::CTestEnvironmentConfig::getTestTimeout | ( | ) |
Returns timeout (in milliseconds), after which test execution is terminated.
Value 0 means infinite timeout. This timeout value is overridden, if timeout is specified in test case.
| isys::CToolsConfigSPtr isys::CTestEnvironmentConfig::getToolsConfig | ( | bool | isConst | ) |
Returns tools configuration.
| std::string isys::CTestEnvironmentConfig::getVersion | ( | ) |
Returns version of testIDEA which saved the test specification file.
| std::string isys::CTestEnvironmentConfig::getWarnings | ( | ) |
If there were any warnings detected during parsing, this method returns non-empty string with description of warnings.
It is recommended to call this method always after parsing.
| std::string isys::CTestEnvironmentConfig::getWorkspace | ( | ) |
Returns workspace file path and name.
| bool isys::CTestEnvironmentConfig::isAlwaysRunInitSeqBeforeRun | ( | ) |
If true, init sequence is executed before test specifications are executed.
Default value (E_DEFAULT) means false.
| bool isys::CTestEnvironmentConfig::isAutoConnectToWinIDEA | ( | ) |
If true is returned, then Test Bench will connect automatically to winIDEA, when names of functions or global vars are required.
Default value (E_DEFAULT) means false.
| bool isys::CTestEnvironmentConfig::isCheckTargetStateBeforeRun | ( | ) |
Returns true, if testIDEA should check target state before running tests and warn user if it does not match state defined in this class, for example the target is not stopped on function 'main'.
| bool isys::CTestEnvironmentConfig::isDeleteAllBPsOnInit | ( | ) |
Returns true, if all breakpoints should be deleted in init sequence. Default value (E_DEFAULT) means false.
| bool isys::CTestEnvironmentConfig::isDisableInterrupts | ( | ) |
Returns true, if interrupts should be disabled in init sequence.
Default value (E_DEFAULT) means false.
| bool isys::CTestEnvironmentConfig::isDownloadOnInit | ( | ) |
If true, download is performed in init sequence. Default value (E_DEFAULT) means false.
|
virtualinherited |
This method returns true, if the object contains no data.
| bool isys::CTestEnvironmentConfig::isResetOnInit | ( | ) |
If true, reset is performed in init sequence. Default value (E_DEFAULT) means false.
| bool isys::CTestEnvironmentConfig::isRunOnInit | ( | ) |
If true, target is started in init sequence. Default value (E_DEFAULT) means false.
|
inherited |
Returns true, if the given section is empty.
|
virtualinherited |
Returns true if object should be serialized as list, for example CTestFunction.
Reimplemented in isys::CTestFunction.
| bool isys::CTestEnvironmentConfig::isUseQualifiedFuncNames | ( | ) |
Returns true, if qualified function names should be presented as content proposals in testIDEA.
Default value (E_DEFAULT) means false.
| bool isys::CTestEnvironmentConfig::isVerifySymbolsBeforeRun | ( | ) |
Returns true, if testIDEA should verify that functions exist on target before test run.
If non-existent functions are found in test cases, pop-up dialog appears in testIDEA.
|
overridevirtual |
Overrides base class method to change file version.
Reimplemented from isys::CTestBase.
| void isys::CTestEnvironmentConfig::setAddress | ( | const std::string & | address | ) |
| void isys::CTestEnvironmentConfig::setAlwaysRunInitSeqBeforeRun | ( | iconnect::ETristate | isAlwaysRunInitSeq | ) |
If set to true, init sequence is run before each test start.
| void isys::CTestEnvironmentConfig::setAutoConnectToWinIDEA | ( | iconnect::ETristate | autoConnect | ) |
If set to true, then Test Bench will connect automatically to winIDEA, when names of functions or global vars are required.
| void isys::CTestEnvironmentConfig::setAutoIdFormatString | ( | const std::string & | format | ) |
Sets format of automatically assigned IDs.
The string format is specific to the tool, which applies IDs. See testIDEA help for testIDEA rules. Users may write their own scripts, which may specify custom formats.
The string can be composed of variables and plain text between them. Variables have the following format: ${<var>}. The following variables are available:
n defines the number of characters for the ID. Optional value m defines the number of characters for the ID extension of derived tests. If m is specified, IDs of derived tests are formed as [base test ID].[derived test id]. Letters, numbers and '.' are used in the ID string.n defines the number of characters for the ID. Optional value m defines the number of characters for the ID extension of derived tests. If m is specified, IDs of derived tests are formed as [base test ID].[derived test id]. Only numbers and '.' are used in the ID string.Example format string:
"/{$id,4}/${function}-${params}-${tags}
| void isys::CTestEnvironmentConfig::setBreakpointsType | ( | EBreakpointsType | breakpointsType | ) |
Sets type of breakpoints to be used in testing.
| void isys::CTestEnvironmentConfig::setCheckTargetStateBeforeRun | ( | iconnect::ETristate | isCheckTargetState | ) |
Defines, if testIDEA should check target state before running tests.
For example, if run until function is specified in init sequence, testIDEA checks if target is stopped there.
|
virtualinherited |
| void isys::CTestEnvironmentConfig::setDefaultReturnValueName | ( | const std::string & | defaultRetValName | ) |
Sets default name for variable, where function return value is stored.
| void isys::CTestEnvironmentConfig::setDeleteAllBPsOnInit | ( | iconnect::ETristate | isDeleteAllBPs | ) |
| void isys::CTestEnvironmentConfig::setDisableInterrupts | ( | iconnect::ETristate | isDisableInterrupts | ) |
| void isys::CTestEnvironmentConfig::setDownloadOnInit | ( | iconnect::ETristate | isDownload | ) |
|
inherited |
Sets value of enum type.
| void isys::CTestEnvironmentConfig::setLoggingParameters | ( | const std::string & | params | ) |
Sets logging parameters.
Parameters are stored in the list in the following order: [logFileName, logObjPrefix]. All parameters are optional. If none of them is specified, logging is off.
|
virtualinherited |
Sets style of the mapping for complete object.
|
inherited |
Sets parent.
| void isys::CTestEnvironmentConfig::setPort | ( | int | port | ) |
| void isys::CTestEnvironmentConfig::setResetOnInit | ( | iconnect::ETristate | isReset | ) |
| void isys::CTestEnvironmentConfig::setRunOnInit | ( | iconnect::ETristate | isRun | ) |
| void isys::CTestEnvironmentConfig::setStopFunction | ( | const std::string & | stopFunction | ) |
| void isys::CTestEnvironmentConfig::setTestTimeout | ( | int | timeout | ) |
Sets timeout (in milliseconds), after which test execution is terminated.
Value 0 means infinite timeout. This timeout value is overridden, if timeout is specified in test case.
| void isys::CTestEnvironmentConfig::setVerifySymbolsBeforeRun | ( | iconnect::ETristate | isVerifySymbols | ) |
Defines, if testIDEA should verify symbols before test run.
It checks if all functions (tested, stubs, ...) exist on target.
| void isys::CTestEnvironmentConfig::setVersion | ( | const std::string & | version | ) |
| void isys::CTestEnvironmentConfig::setWorkspace | ( | const std::string & | workspace | ) |
|
virtualinherited |
Returns object data as YAML string.