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; }