From 483c8bcf8efd3c9011d86b4560efd5012c7a278c Mon Sep 17 00:00:00 2001 From: "Mateusz P. Nowak" Date: Mon, 22 Dec 2025 14:56:09 +0000 Subject: [PATCH] Fix multiple plaftorm issue in Config/allowlist.cpp test --- sycl/test-e2e/Config/allowlist.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sycl/test-e2e/Config/allowlist.cpp b/sycl/test-e2e/Config/allowlist.cpp index a490b86a7fa55..ce9dfc4d016c2 100644 --- a/sycl/test-e2e/Config/allowlist.cpp +++ b/sycl/test-e2e/Config/allowlist.cpp @@ -131,8 +131,17 @@ int main() { auto Platforms = sycl::platform::get_platforms(); if (Platforms.empty()) throw std::runtime_error("No platform is found"); - else if (Platforms.size() != 1) - throw std::runtime_error("Expected only one platform."); + + std::string FirstName = + Platforms.at(0).get_info(); + std::string FirstVer = + Platforms.at(0).get_info(); + for (const auto &P : Platforms) { + if (P.get_info() != FirstName || + P.get_info() != FirstVer) { + throw std::runtime_error("Allowlist matched multiple platform types"); + } + } return 0; }