EXSWHTEC-283 - Introduce build dependencies for numerical accuracy tests #233
Change-Id: I5381beb47347c24a161113b986fa7f252057ffdb
Этот коммит содержится в:
коммит произвёл
Rakesh Roy
родитель
044a59496c
Коммит
122403f464
@@ -47,6 +47,7 @@ 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_restriction{hip_api.getFileRestriction()};
|
||||
bool found_restriction{false};
|
||||
@@ -66,7 +67,8 @@ void findAPICallInFile(HipAPI& hip_api, std::string test_module_file) {
|
||||
(line.find(api_member) != std::string::npos) ||
|
||||
(line.find(api_newline) != std::string::npos) ||
|
||||
(line.find(hip_api.getName() + "(") == 0) ||
|
||||
(line.find(api_templated) != std::string::npos)) {
|
||||
(line.find(api_templated) != std::string::npos) ||
|
||||
(line.find(api_kernel_def_macro) != std::string::npos)) {
|
||||
if (api_restriction == "" || found_restriction) {
|
||||
hip_api.addFileOccurrence(FileOccurrence(test_module_file, line_number));
|
||||
}
|
||||
@@ -135,6 +137,8 @@ void findAPITestCaseInFileByAPIName(HipAPI& hip_api, std::string test_module_fil
|
||||
std::string line;
|
||||
|
||||
std::string test_case_definition{"TEST_CASE("};
|
||||
std::string test_def_macro{"_TEST_DEF("};
|
||||
std::string test_def_impl_macro{"_TEST_DEF_IMPL("};
|
||||
std::string test_case{"None"};
|
||||
|
||||
while (std::getline(test_module_file_handler, line)) {
|
||||
@@ -146,6 +150,14 @@ void findAPITestCaseInFileByAPIName(HipAPI& hip_api, std::string test_module_fil
|
||||
if (test_case.find("_" + hip_api.getName() + "_") != std::string::npos) {
|
||||
hip_api.addTestCase(TestCaseOccurrence{test_case, test_module_file, line_number});
|
||||
}
|
||||
} else if ((line.find(test_def_macro) != std::string::npos) ||
|
||||
(line.find(test_def_impl_macro) != std::string::npos)) {
|
||||
test_case = line.substr(line.find("(") + 1);
|
||||
test_case = test_case.substr(0, test_case.find(","));
|
||||
if (test_case == hip_api.getName() || test_case == hip_api.getName() + "_wrapper") {
|
||||
hip_api.addTestCase(TestCaseOccurrence{"Unit_Device_" + test_case + "_Accuracy_Positive",
|
||||
test_module_file, line_number});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,4 +415,4 @@ std::vector<std::string> extractTestModuleFiles(std::string& tests_root_director
|
||||
|
||||
std::string findAbsolutePathOfFile(std::string file_path) {
|
||||
return std::filesystem::canonical(std::filesystem::absolute(file_path));
|
||||
}
|
||||
}
|
||||
Ссылка в новой задаче
Block a user