test: prepare tests to run with clang on Windows in release config

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-11-13 15:50:24 +00:00
committed by Compute-Runtime-Automation
parent 0a99d389ce
commit 18b43eeb6a
5 changed files with 8 additions and 4 deletions

View File

@@ -31,7 +31,7 @@ components:
branch: master
dest_dir: infra
fetch_tags: true
revision: v5514
revision: v5515
type: git
internal:
branch: master

View File

@@ -23,6 +23,7 @@
#include "shared/test/common/utilities/base_object_utils.h"
#include "opencl/source/event/user_event.h"
#include "opencl/source/program/create.inl"
#include "opencl/test/unit_test/command_queue/command_queue_fixture.h"
#include "opencl/test/unit_test/command_queue/enqueue_map_buffer_fixture.h"
#include "opencl/test/unit_test/fixtures/buffer_fixture.h"

View File

@@ -19,6 +19,7 @@
#include "opencl/source/event/event.h"
#include "opencl/source/helpers/hardware_commands_helper.h"
#include "opencl/source/kernel/kernel.h"
#include "opencl/source/program/create.inl"
#include "opencl/test/unit_test/command_queue/command_enqueue_fixture.h"
#include "opencl/test/unit_test/command_queue/enqueue_fixture.h"
#include "opencl/test/unit_test/command_queue/enqueue_write_image_fixture.h"

View File

@@ -53,7 +53,7 @@ set(CLOC_SEGFAULT_TEST_INCLUDES
${NEO_SOURCE_DIR}
)
if(CMAKE_COMPILER_IS_GNUCC)
if(CMAKE_COMPILER_IS_GNUCC OR(WIN32 AND NOT MSVC AND ${CMAKE_BUILD_TYPE} STREQUAL "Release"))
target_compile_definitions(ocloc_segfault_test PRIVATE SKIP_SEGFAULT_TEST=1)
endif()

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2022 Intel Corporation
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -40,7 +40,7 @@ void captureAndCheckStdOut() {
EXPECT_TRUE(hasSubstr(callstack, std::string("Callstack")));
EXPECT_TRUE(hasSubstr(callstack, std::string("cloc_segfault_test")));
EXPECT_TRUE(hasSubstr(callstack, std::string("generateSegfaultWithSafetyGuard")));
EXPECT_TRUE(hasSubstr(callstack, std::string("generateSegfaultWithSafetyGuard"))) << callstack;
}
TEST(SegFault, givenCallWithSafetyGuardWhenSegfaultHappensThenCallstackIsPrintedToStdOut) {
@@ -51,5 +51,7 @@ TEST(SegFault, givenCallWithSafetyGuardWhenSegfaultHappensThenCallstackIsPrinted
auto retVal = generateSegfaultWithSafetyGuard(&segfault);
EXPECT_EQ(-60, retVal);
#else
GTEST_SKIP();
#endif
}