EXSWHTEC-384 - Coverage Tool and Test Plan update #455
Change-Id: Idf52308186a73ae1c4d815eb59f20ea7da99c964
This commit is contained in:
committed by
Rakesh Roy
parent
66e2885107
commit
dc78fafa49
@@ -47,7 +47,8 @@ void findAPICallInFile(HipAPI& hip_api, std::string test_module_file) {
|
||||
std::string api_member{"." + hip_api.getName() + "("};
|
||||
std::string api_newline{" " + hip_api.getName() + "("};
|
||||
std::string api_templated{" " + hip_api.getName() + "<"};
|
||||
std::string api_kernel_def_macro{"_KERNEL_DEF(" + hip_api.getName() + ")"};
|
||||
std::string api_kernel_def_macro{"_KERNEL_DEF(" + hip_api.getName()};
|
||||
std::string api_test_def_macro{"_TEST_DEF(" + hip_api.getName()};
|
||||
|
||||
std::string api_restriction{hip_api.getFileRestriction()};
|
||||
bool found_restriction{false};
|
||||
@@ -68,7 +69,8 @@ void findAPICallInFile(HipAPI& hip_api, std::string test_module_file) {
|
||||
(line.find(api_newline) != std::string::npos) ||
|
||||
(line.find(hip_api.getName() + "(") == 0) ||
|
||||
(line.find(api_templated) != std::string::npos) ||
|
||||
(line.find(api_kernel_def_macro) != std::string::npos)) {
|
||||
(line.find(api_kernel_def_macro) != std::string::npos) ||
|
||||
(line.find(api_test_def_macro) != std::string::npos)) {
|
||||
if (api_restriction == "" || found_restriction) {
|
||||
hip_api.addFileOccurrence(FileOccurrence(test_module_file, line_number));
|
||||
}
|
||||
@@ -199,6 +201,7 @@ std::vector<HipAPI> extractHipAPIs(std::string& hip_api_header_file,
|
||||
of code shall not be considered.
|
||||
*/
|
||||
std::string hip_api_prefix{"hip"};
|
||||
std::string hip_api_prefix_builtin{"__hip"};
|
||||
std::string group_definition{"@defgroup"};
|
||||
std::string add_group_definition{"@addtogroup"};
|
||||
std::string start_of_api_groups{"HIP API"};
|
||||
@@ -289,7 +292,11 @@ std::vector<HipAPI> extractHipAPIs(std::string& hip_api_header_file,
|
||||
Remove all spaces if they exist in the parsed string, e.g.,
|
||||
hipError_t hipDeviceSetLimit ( enum hipLimit_t limit, size_t value );.
|
||||
*/
|
||||
std::string api_name{api_name_no_brackets.substr(api_name_no_brackets.rfind(hip_api_prefix))};
|
||||
auto api_name_pos = api_name_no_brackets.rfind(hip_api_prefix_builtin);
|
||||
if (api_name_pos == std::string::npos) {
|
||||
api_name_pos = api_name_no_brackets.rfind(hip_api_prefix);
|
||||
}
|
||||
std::string api_name{api_name_no_brackets.substr(api_name_pos)};
|
||||
api_name.erase(std::remove(api_name.begin(), api_name.end(), ' '), api_name.end());
|
||||
|
||||
if (!api_group_names_tracker.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user