winIDEA SDK
|
This class contains variables, which are stored on host, not on target.
Variables, which name starts with underscore (_) are reserved for internal usage.
#include <CTestHostVars.h>
Public Member Functions | |
CTestHostVars () | |
Default constructor. | |
CTestHostVars (const CTestHostVarsSPtr &src) | |
Copy constructor. | |
std::string | getValue (const std::string &varName) |
Returns variable value. | |
void | initBatchVars () |
Initializes host variables for batch of test cases, for example date and time. | |
void | initCommonHostVars () |
Initializes date, time, ISO time, user ID, and user name. | |
void | initEnvVars () |
This method stores all environment variables of the process to this class. More... | |
void | initSvnRevisionHostVar (const std::string &workingCopyPath) |
Initializes host var CTestHostVars::RESERVED_SVN_REVISION with current subversion number. More... | |
void | initTestCaseVars (CTestSpecificationSPtr &testSpec, CTestEnvironmentConfigSPtr envConfig) |
Initializes host variables from test case, for example ${_testID}. More... | |
void | initTestGroupVars (CTestGroupSPtr &group, CTestEnvironmentConfigSPtr envConfig) |
Initializes host variables from test group, for example ${_groupID}. More... | |
void | initTestReportHostVars (const std::string &wiWorkspaceDir, const std::string &wiWorkspaceFile, const std::string &defaultDlFile) |
Initializes host vars used in test report output file name. | |
void | removeVar (const std::string &varName) |
Removes variable from internal map. | |
std::string | replaceHostVars (const std::string &expression) |
Replaces all host variables in input string with their values. More... | |
void | setDefaultCoreId (const std::string &coreId) |
Sets coreID to be used when core ID value in test case is empty. More... | |
void | setDirs (const std::string &winIDEAWorkspace, const std::string &iyamlDir, const std::string &reportDir) |
Sets directories useful for itest. | |
void | setValue (const std::string &varName, const std::string &varValue) |
Sets variable value. | |
std::string | toString () |
Returns all host variables and their values as string. More... | |
Static Public Member Functions | |
static CTestHostVarsSPtr | createDiagramVars (CTestSpecificationSPtr &testSpec, CTestDiagramConfigSPtr &diagConfig) |
Creates instance of this class with host variables used in diagrams section. | |
static CTestHostVarsSPtr | createGrpAnalyzerFNameVars (CTestGroupSPtr &testGroup) |
Initializes host vars for group merged analyzer file name. | |
static CTestHostVarsSPtr | createTcAnalyzerFNameVars (CTestSpecificationSPtr &testSpec) |
Initializes host vars for test case analyzer file name. | |
static std::string | getDiagramFileName (CTestSpecificationSPtr &testSpec, CTestDiagramConfigSPtr &diagConfig) |
Returns file name of a diagram, where all host vars are replaced with their values. | |
static void | getHostVarsForAnalyzerFileName (iconnect::StrVector &hostVars) |
Returns list of host variables available for analyzer file name. | |
static void | getHostVarsForAutoTestId (iconnect::StrVector &hostVars, bool isIncludeCoreId, bool isForProposals) |
Returns list of host variables available for test case ID. | |
static void | getHostVarsForGroupAnalyzerFileName (iconnect::StrVector &hostVars) |
Returns list of host variables available for group analyzer file name. | |
void isys::CTestHostVars::initEnvVars | ( | ) |
This method stores all environment variables of the process to this class.
All environment variables get prefix _env_
, so they can not collide with user variables.
void isys::CTestHostVars::initSvnRevisionHostVar | ( | const std::string & | workingCopyPath | ) |
Initializes host var CTestHostVars::RESERVED_SVN_REVISION with current subversion number.
workingCopyPath | path to directory or file, on which svn info will be executed. |
void isys::CTestHostVars::initTestCaseVars | ( | CTestSpecificationSPtr & | testSpec, |
CTestEnvironmentConfigSPtr | envConfig | ||
) |
Initializes host variables from test case, for example ${_testID}.
If host variables with directories are needed, call setDirs() before this method.
testSpec | the test case used to initialize variables |
envConfig | configuration used to get ID of core 0, if core ID is not specified in the test case. Alternatively you can specify default core ID by calling setDefaultCoreId() before this method, and set this value to NULL. |
void isys::CTestHostVars::initTestGroupVars | ( | CTestGroupSPtr & | group, |
CTestEnvironmentConfigSPtr | envConfig | ||
) |
Initializes host variables from test group, for example ${_groupID}.
If host variables with directories are needed, call setDirs() before this method.
group | the test group used to initialize variables |
envConfig | configuration used to get ID of core 0, if core ID is not specified in the test case. Alternatively you can specify default core ID by calling setDefaultCoreId() before this method, and set this value to NULL. |
std::string isys::CTestHostVars::replaceHostVars | ( | const std::string & | expression | ) |
Replaces all host variables in input string with their values.
Returns string with replacements.
void isys::CTestHostVars::setDefaultCoreId | ( | const std::string & | coreId | ) |
Sets coreID to be used when core ID value in test case is empty.
Alternatively you can specify envConfig
in initTestCaseVars().
std::string isys::CTestHostVars::toString | ( | ) |
Returns all host variables and their values as string.
Use this method for debugging purposes only.