Skip to content

Commit

Permalink
Enable validation on conformance tests for platform.
Browse files Browse the repository at this point in the history
Also necessitates splitting urInit/urTearDown into their own suite due
to how they currently work WRT global state.
  • Loading branch information
aarongreig committed Jul 18, 2023
1 parent e002ca8 commit 0719310
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions test/conformance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ endfunction()

add_subdirectory(testing)

add_subdirectory(runtime)
add_subdirectory(platform)
add_subdirectory(device)
add_subdirectory(context)
Expand Down
4 changes: 1 addition & 3 deletions test/conformance/platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

add_conformance_test(platform
urInit.cpp
urPlatformCreateWithNativeHandle.cpp
urPlatformGet.cpp
urPlatformGetApiVersion.cpp
urPlatformGetBackendOption.cpp
urPlatformGetInfo.cpp
urPlatformGetLastError.cpp
urPlatformGetNativeHandle.cpp
urTearDown.cpp)
urPlatformGetNativeHandle.cpp)
7 changes: 6 additions & 1 deletion test/conformance/platform/fixtures.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ struct urTest : ::testing::Test {

void SetUp() override {
ur_device_init_flags_t device_flags = 0;
ASSERT_SUCCESS(urInit(device_flags, nullptr));
ur_loader_config_handle_t config;
ASSERT_SUCCESS(urLoaderConfigCreate(&config));
ASSERT_SUCCESS(
urLoaderConfigEnableLayer(config, "UR_LAYER_FULL_VALIDATION"));
ASSERT_SUCCESS(urInit(device_flags, config));
ASSERT_SUCCESS(urLoaderConfigRelease(config));
}

void TearDown() override {
Expand Down
8 changes: 8 additions & 0 deletions test/conformance/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (C) 2022 Intel Corporation
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
# See LICENSE.TXT
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

add_conformance_test(runtime
urInit.cpp
urTearDown.cpp)
File renamed without changes.
File renamed without changes.

0 comments on commit 0719310

Please sign in to comment.