mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Add control on platform life cycle.
Change-Id: I5c24b41747d822b71dd57e9a949cf25fcc78a453
This commit is contained in:
committed by
sys_ocldev
parent
0f91c3bc47
commit
a21c0a0074
@@ -55,6 +55,7 @@ class AsyncEventsHandlerTests : public ::testing::Test {
|
||||
}
|
||||
|
||||
void SetUp() override {
|
||||
constructPlatform();
|
||||
dbgRestore.reset(new DebugManagerStateRestore());
|
||||
DebugManager.flags.EnableAsyncEventsHandler.set(false);
|
||||
handler.reset(new MockHandler());
|
||||
@@ -68,6 +69,7 @@ class AsyncEventsHandlerTests : public ::testing::Test {
|
||||
event1->release();
|
||||
event2->release();
|
||||
event3->release();
|
||||
platformImpl.reset(nullptr);
|
||||
}
|
||||
|
||||
std::unique_ptr<DebugManagerStateRestore> dbgRestore;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Intel Corporation
|
||||
* Copyright (c) 2017 - 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -56,6 +56,7 @@ TEST(EventCallbackTest, NestedCallbacksAreCalledForUserEvent) {
|
||||
}
|
||||
|
||||
TEST(EventCallbackTest, NestedCallbacksAreCalledForEvent) {
|
||||
constructPlatform();
|
||||
std::unique_ptr<Device> device(DeviceHelper<>::create());
|
||||
MockContext context;
|
||||
MockCommandQueue queue(&context, device.get(), nullptr);
|
||||
@@ -68,4 +69,5 @@ TEST(EventCallbackTest, NestedCallbacksAreCalledForEvent) {
|
||||
platform()->getAsyncEventsHandler()->closeThread();
|
||||
|
||||
EXPECT_EQ(4u, nestLevel);
|
||||
platformImpl.reset(nullptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user