[hip-tests] Update API coverage report generator (#1932)

* [hip-tests] Update API coverage report generator

Updates the HIP API coverage tool. It now takes
extra arguments for the location of the catch test folder
and for the working directory. This avoids issues where the output
of the executable is dependent on the path where it is being
executed from.

Also updates CmakeLists.txt to integrate seamlessly with the
hip-tests project and avoid using commands which rely on
relative paths.

* Remove double new line

* Remove Cmake option to generate coverage

Removes Cmake option to generate coverage. Instead, explicitly removes
the gen_coverage target from all (this is already the default but
doing it explicitly prevents confusion).
このコミットが含まれているのは:
Fábio Mestre
2025-12-10 16:53:47 +00:00
committed by GitHub
コミット d4fe3f1cc3
9個のファイルの変更、64行の追加、40行の削除
-3
ファイルの表示
@@ -337,16 +337,13 @@ std::vector<HipAPI> extractDeviceAPIs(std::string& apis_list_file,
main group that shall be considered is HIP API. Before that group is defined, lines
of code shall not be considered.
*/
int line_number{0};
bool group_start{false};
bool device_groups_start{false};
std::string restriction{""};
std::string file_restriction_definition{"File restriction: "};
std::string device_groups_definition{"Device groups: ("};
std::vector<std::string> device_groups;
while (std::getline(apis_list_file_handler, line)) {
++line_number;
if (line.find("[") != std::string::npos) {
std::string group_name = line.substr(0, line.rfind(" "));