SWDEV-515261 - strip newline from rocm_agent_enumerator output (#222)

此提交包含在:
Assiouras, Ioannis
2025-05-30 05:51:00 +01:00
提交者 GitHub
父節點 ef6c95f6ce
當前提交 ac7c31d49e
+2 -1
查看文件
@@ -38,7 +38,8 @@ std::string TestContext::substringFound(std::vector<std::string> list, std::stri
std::string TestContext::getCurrentArch() {
#if HT_LINUX
const char* cmd =
"/opt/rocm/bin/rocm_agent_enumerator | awk '$0 != \"gfx000\"' | xargs | sed -e 's/ /;/g'";
"/opt/rocm/bin/rocm_agent_enumerator | awk '$0 != \"gfx000\"' | xargs | sed -e 's/ /;/g' | "
"tr -d '\n'";
std::array<char, 1024> buffer;
std::string result;
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);