mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add global destructor of platforms
Change-Id: I7f0c9a9a13cae5cbf831e0d4e410c78c001a75d1 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
e079d94869
commit
40d487fa90
@ -28,6 +28,9 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace NEO {
|
||||
void __attribute__((destructor)) platformsDestructor();
|
||||
}
|
||||
using namespace NEO;
|
||||
|
||||
class DrmTestsFixture {
|
||||
@ -520,3 +523,11 @@ TEST_F(DrmTests, whenCreateDrmIsCalledThenProperHwInfoIsSetup) {
|
||||
EXPECT_LT(0u, currentHwInfo->gtSystemInfo.EUCount);
|
||||
EXPECT_LT(0u, currentHwInfo->gtSystemInfo.SubSliceCount);
|
||||
}
|
||||
|
||||
TEST(PlatformsDestructor, whenGlobalPlatformsDestructorIsCalledThenGlobalPlatformsAreDestroyed) {
|
||||
EXPECT_NE(nullptr, platformsImpl);
|
||||
platformsDestructor();
|
||||
|
||||
EXPECT_EQ(nullptr, platformsImpl);
|
||||
platformsImpl = new std::vector<std::unique_ptr<Platform>>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user