This class maintains all data required for test case filtering, and contains methods, which perform the filtering. More...
#include <CTestFilterController.h>
Public Member Functions | |
| void | clear () |
| Clears symbols. | |
| int | countExecutableTests (const isys::CTestSpecificationSPtr &testSpec, int derivedLevel, const isys::CTestFilterSPtr &testFilter) |
| Returns the number of tests which are executable (have 'run' flag set and are note excluded by the given filter. | |
| void | countTestCasesInGroup (const CTestGroupSPtr &group, iconnect::StrSet &partitionsWTestInGroup, iconnect::StrSet &modulesWTestInGroup, iconnect::StrSet &functionsWTestInGroup) |
| Based on filter from the given group, this m. | |
| bool | filterTestSpec (const isys::CTestSpecificationSPtr &testSpec, bool isTestSpecMerged, const isys::CTestFilterSPtr &filter) |
| Returns true, if testSpec passes filter, false otherwise. | |
| std::string | getTestItemsForFilter (const CTestGroupSPtr &testGroup, iconnect::StrVector &partitions, iconnect::StrVector &modules, iconnect::StrVector &qualFuncNames) |
| Returns all partitions, modules, and functions for coreID from filter, which pass filter. | |
| bool | isEmpty () |
| Returns true, if there are no symbols stored in this object. | |
| bool | isTestExecutable (const isys::CTestSpecificationSPtr &testSpec, const isys::CTestFilterSPtr &testFilter) |
| Returns true, if the test will be executed. | |
| void | setDefaultCoreId (const std::string &coreId) |
| Sets list of core IDs. | |
| void | setDefaultPartition (const std::string &coreId, const std::string &defaultPartition) |
| Used for assigning test cases to groups. | |
| void | setFunctionToModuleMap (const std::string &coreId, iconnect::StrStrMap &functionToModuleMap) |
| Sets map with keys containing function name with partition, and modules as values. | |
| std::string | toString () |
| Prints stored symbol information. | |
This class maintains all data required for test case filtering, and contains methods, which perform the filtering.
It maintains the following structure of symbols: coreInfo --> partition1 --> module1 --> func1 func2 ... module2 ... partition2 --> moduleN
partition3 ...
| void isys::CTestFilterController::clear | ( | ) |
Clears symbols.
Can be used to indicate that refresh is needed.
| int isys::CTestFilterController::countExecutableTests | ( | const isys::CTestSpecificationSPtr & | testSpec, |
| int | derivedLevel, | ||
| const isys::CTestFilterSPtr & | testFilter ) |
Returns the number of tests which are executable (have 'run' flag set and are note excluded by the given filter.
| testSpec | the test spec. and it's derived test specs to be counted |
| derivedLevel | how deep to test derived test specifications |
| testFilter | filter to be used for test inclusion/exclusion. If the filter specifies script function, an IllegalStateException is thrown, since scripts can't be called from native code. |
| void isys::CTestFilterController::countTestCasesInGroup | ( | const CTestGroupSPtr & | group, |
| iconnect::StrSet & | partitionsWTestInGroup, | ||
| iconnect::StrSet & | modulesWTestInGroup, | ||
| iconnect::StrSet & | functionsWTestInGroup ) |
Based on filter from the given group, this m.
returns all partitions, modules, and functions, which are tested by at least one test case in a group.
| bool isys::CTestFilterController::filterTestSpec | ( | const isys::CTestSpecificationSPtr & | testSpec, |
| bool | isTestSpecMerged, | ||
| const isys::CTestFilterSPtr & | filter ) |
Returns true, if testSpec passes filter, false otherwise.
| testSpec | test specification to be filtered |
| isTestSpecMerged | if the given test spec is already merged, then specifying this flag as True saves some time. If false, the given test spec is merged before filter is applied. |
| filter | contains data to be used for filtering |
| std::string isys::CTestFilterController::getTestItemsForFilter | ( | const CTestGroupSPtr & | testGroup, |
| iconnect::StrVector & | partitions, | ||
| iconnect::StrVector & | modules, | ||
| iconnect::StrVector & | qualFuncNames ) |
Returns all partitions, modules, and functions for coreID from filter, which pass filter.
| testGroup | test group. |
| partitions | vector to receive partition names. |
| modules | vector to receive module names. |
| qualFuncNames | vector to receive qualified function names with module paths. |
| bool isys::CTestFilterController::isTestExecutable | ( | const isys::CTestSpecificationSPtr & | testSpec, |
| const isys::CTestFilterSPtr & | testFilter ) |
Returns true, if the test will be executed.
This method is similar to filterTestSpec(), but always performs merging.
| testSpec | the test spec. to be tested for execution |
| testFilter | filter to be used for test inclusion/exclusion. If the filter specifies script function, an IllegalStateException is thrown, since scripts can't be called from native code. |
| void isys::CTestFilterController::setDefaultPartition | ( | const std::string & | coreId, |
| const std::string & | defaultPartition ) |
Used for assigning test cases to groups.
You can use CIDEController::getDefaultDownloadFile() to obtain this value.
| coreId | core ID. |
| defaultPartition | name of default download file as set in winIDEA. |
| void isys::CTestFilterController::setFunctionToModuleMap | ( | const std::string & | coreId, |
| iconnect::StrStrMap & | functionToModuleMap ) |
Sets map with keys containing function name with partition, and modules as values.
You can use CDataController::getFunctionToModuleMap() to obtain this information.
| coreId | core ID. |
| functionToModuleMap | function name to module name, for example: main,,sample.elf: main.c |