Temporarily disabling sip kernel generation for ULTs

- disabled two tests
- added new tests for SipKernel

Change-Id: I89ca37c561a04e9ab10469ae708aee5a05f0da33
This commit is contained in:
Hoppe, Mateusz 2018-03-13 16:55:41 +01:00
parent ea412d210f
commit 2fb9bc2e2e
3 changed files with 39 additions and 8 deletions

View File

@ -523,13 +523,14 @@ foreach(GEN_NUM RANGE 0 ${MAX_GEN} 1)
list(APPEND sip_debug_local_kernel_output_file "sip_dummy_kernel_debug_local_64")
endif()
if("gen${GEN_NUM}" STREQUAL "gen9" )
neo_gen_kernel_from_ll(test_kernel_sip_debug_local_${PLATFORM_IT_LOWER} ${PLATFORM_IT_LOWER} ${sip_kernel_file_name} ${sip_debug_local_kernel_output_file} ${TEST_KERNEL_SIP_DEBUG_LOCAL_options})
add_dependencies(unit_tests test_kernel_sip_debug_local_${PLATFORM_IT_LOWER})
endif()
# Temporarily disabled sip kernel generation
# if("gen${GEN_NUM}" STREQUAL "gen9" )
# neo_gen_kernel_from_ll(test_kernel_sip_debug_local_${PLATFORM_IT_LOWER} ${PLATFORM_IT_LOWER} ${sip_kernel_file_name} ${sip_debug_local_kernel_output_file} ${TEST_KERNEL_SIP_DEBUG_LOCAL_options})
# add_dependencies(unit_tests test_kernel_sip_debug_local_${PLATFORM_IT_LOWER})
# endif()
neo_gen_kernel_from_ll(test_kernel_sip_debug_${PLATFORM_IT_LOWER} ${PLATFORM_IT_LOWER} ${sip_kernel_file_name} ${sip_debug_kernel_output_file} ${TEST_KERNEL_SIP_DEBUG_options})
add_dependencies(unit_tests test_kernel_sip_debug_${PLATFORM_IT_LOWER})
# neo_gen_kernel_from_ll(test_kernel_sip_debug_${PLATFORM_IT_LOWER} ${PLATFORM_IT_LOWER} ${sip_kernel_file_name} ${sip_debug_kernel_output_file} ${TEST_KERNEL_SIP_DEBUG_options})
# add_dependencies(unit_tests test_kernel_sip_debug_${PLATFORM_IT_LOWER})
if(${PLATFORM_SUPPORTS_2_0})
neo_gen_kernel_with_options(test_kernel_2_0_${PLATFORM_IT_LOWER} ${PLATFORM_IT_LOWER} ${TEST_KERNEL_2_0} ${TEST_KERNEL_2_0_options})

View File

@ -110,6 +110,16 @@ TEST(Sip, getType) {
EXPECT_EQ(SipKernelType::COUNT, undefined.getType());
}
TEST(Sip, givenCsrTypeSipKernelWhenGetDebugSurfaceBtiIsCalledThenInvalidValueIsReturned) {
SipKernel csr{SipKernelType::Csr, getSipProgramWithCustomBinary()};
EXPECT_EQ(-1, csr.getDebugSurfaceBti());
}
TEST(Sip, givenCsrTypeSipKernelWhenGetDebugSurfaceSizeIsCalledThenZeroIsReturned) {
SipKernel csr{SipKernelType::Csr, getSipProgramWithCustomBinary()};
EXPECT_EQ(0u, csr.getDebugSurfaceSize());
}
TEST(Sip, givenSipKernelClassWhenAskedForMaxDebugSurfaceSizeThenCorrectValueIsReturned) {
EXPECT_EQ(0x49c000u, SipKernel::maxDbgSurfaceSize);
}
@ -126,7 +136,7 @@ TEST(DebugSip, WhenRequestingDbgCsrWithLocalMemorySipKernelThenProperCompilerInt
EXPECT_STREQ("-cl-include-sip-kernel-local-debug -cl-include-sip-csr -cl-set-bti:0", opt);
}
TEST(DebugSip, givenDebugCsrSipKernelWhenAskedForDebugSurfaceBtiAndSizeThenBtiIsZeroAndSizeGreaterThanZero) {
TEST(DebugSip, DISABLED_givenDebugCsrSipKernelWhenAskedForDebugSurfaceBtiAndSizeThenBtiIsZeroAndSizeGreaterThanZero) {
auto mockDevice = std::unique_ptr<MockDevice>(Device::create<MockDevice>(nullptr));
EXPECT_NE(nullptr, mockDevice);
MockCompilerDebugVars igcDebugVars;
@ -148,4 +158,24 @@ TEST(DebugSip, givenDebugCsrSipKernelWhenAskedForDebugSurfaceBtiAndSizeThenBtiIs
gEnvironment->igcPopDebugVars();
}
TEST(DebugSip, givenDbgCsrTypeSipKernelWhenGetDebugSurfaceBtiIsCalledThenInvalidValueIsReturned) {
SipKernel csr{SipKernelType::DbgCsr, getSipProgramWithCustomBinary()};
EXPECT_EQ(0, csr.getDebugSurfaceBti());
}
TEST(DebugSip, givenDbgCsrTypeSipKernelWhenGetDebugSurfaceSizeIsCalledThenNonZeroIsReturned) {
SipKernel csr{SipKernelType::DbgCsr, getSipProgramWithCustomBinary()};
EXPECT_NE(0u, csr.getDebugSurfaceSize());
}
TEST(DebugSip, givenDbgCsrLocalTypeSipKernelWhenGetDebugSurfaceBtiIsCalledThenInvalidValueIsReturned) {
SipKernel csr{SipKernelType::DbgCsrLocal, getSipProgramWithCustomBinary()};
EXPECT_EQ(0, csr.getDebugSurfaceBti());
}
TEST(DebugSip, givenDbgCsrLocalTypeSipKernelWhenGetDebugSurfaceSizeIsCalledThenNonZeroIsReturned) {
SipKernel csr{SipKernelType::DbgCsrLocal, getSipProgramWithCustomBinary()};
EXPECT_NE(0u, csr.getDebugSurfaceSize());
}
} // namespace SipKernelTests

View File

@ -36,7 +36,7 @@ extern std::string getDebugSipKernelNameWithBitnessAndProductSuffix(std::string
typedef ::testing::Test gen9SipTests;
GEN9TEST_F(gen9SipTests, givenDebugCsrSipKernelWithLocalMemoryWhenAskedForDebugSurfaceBtiAndSizeThenBtiIsZeroAndSizeGreaterThanZero) {
GEN9TEST_F(gen9SipTests, DISABLED_givenDebugCsrSipKernelWithLocalMemoryWhenAskedForDebugSurfaceBtiAndSizeThenBtiIsZeroAndSizeGreaterThanZero) {
auto mockDevice = std::unique_ptr<MockDevice>(Device::create<MockDevice>(nullptr));
EXPECT_NE(nullptr, mockDevice);
MockCompilerDebugVars igcDebugVars;