Skip to content

Commit 2e0d73c

Browse files
cperkinsintelbader
andauthored
[SYCL] fix for locale test (#18838)
if there are absolutely no platforms, then just skip this test --------- Co-authored-by: Alexey Bader <[email protected]>
1 parent f7583ca commit 2e0d73c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sycl/unittests/allowlist/DeviceIsAllowed.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ TEST(DeviceIsAllowedTests, CheckLocalizationDoesNotImpact) {
9595
// We want to make sure that DeviceVenderId doesn't have a comma
9696
// inserted (ie "0x8,086" ), which will break the platform retrieval.
9797

98+
if (sycl::platform::get_platforms().empty()) {
99+
GTEST_SKIP() << "No SYCL platforms found.";
100+
}
101+
98102
try {
99103
auto previous = std::locale::global(std::locale("en_US.UTF-8"));
100104
#ifdef _WIN32

0 commit comments

Comments
 (0)