Fixed unit-test env var list parsing and improved filtered test run speed (#1626)

* Fixed parsing of env var lists which were overwriting the mutable env var string and polluting future parses.

* Fixed all tests to obey UT_DATATYPES and UT_REDOPS filters.

* Allow tests to bail early via `GTEST_SKIP` if UT_DATATYPES or UT_REDOPS filters give a test size of zero. This allows tests to run much faster with filters on.

* Wrapped the support checks in helper functions on `TestBed`.

[ROCm/rccl commit: 18e9ad913b]
This commit is contained in:
corey-derochie-amd
2025-12-10 10:06:44 -07:00
کامیت شده توسط GitHub
والد 2e0abab81a
کامیت de82a18790
6فایلهای تغییر یافته به همراه126 افزوده شده و 38 حذف شده
@@ -9,7 +9,9 @@
#include <cstdlib>
#include <unistd.h>
#include <sys/wait.h>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <unordered_map>
namespace RcclUnitTesting
@@ -337,11 +339,13 @@ namespace RcclUnitTesting
std::vector<std::string> result;
if (getenv(varname.c_str()))
{
char* token = strtok(getenv(varname.c_str()), ",;");
while (token != NULL)
std::string env = getenv(varname.c_str());
std::replace(env.begin(), env.end(), ';', ',');
std::istringstream ss(env);
std::string token;
while (std::getline(ss, token, ','))
{
result.push_back(token);
token = strtok(NULL, ",;");
}
}
return result;