diff --git a/tests/kfdtest/src/KFDBaseComponentTest.cpp b/tests/kfdtest/src/KFDBaseComponentTest.cpp index f950a7a1f1..5618945505 100644 --- a/tests/kfdtest/src/KFDBaseComponentTest.cpp +++ b/tests/kfdtest/src/KFDBaseComponentTest.cpp @@ -68,6 +68,8 @@ void KFDBaseComponentTest::SetUp() { g_baseTest = this; + m_pAsm = new Assembler(GetGfxVersion(nodeProperties)); + ROUTINE_END } @@ -86,6 +88,10 @@ void KFDBaseComponentTest::TearDown() { EXPECT_SUCCESS(hsaKmtCloseKFD()); g_baseTest = NULL; + if (m_pAsm) + delete m_pAsm; + m_pAsm = nullptr; + ROUTINE_END } diff --git a/tests/kfdtest/src/KFDBaseComponentTest.hpp b/tests/kfdtest/src/KFDBaseComponentTest.hpp index e27baf1cc1..ec3053c3d3 100644 --- a/tests/kfdtest/src/KFDBaseComponentTest.hpp +++ b/tests/kfdtest/src/KFDBaseComponentTest.hpp @@ -34,6 +34,7 @@ #include "hsakmt.h" #include "OSWrapper.hpp" #include "KFDTestUtil.hpp" +#include "Assemble.hpp" // @class KFDBaseComponentTest class KFDBaseComponentTest : public testing::Test { @@ -74,6 +75,7 @@ class KFDBaseComponentTest : public testing::Test { HsaMemFlags m_MemoryFlags; HsaNodeInfo m_NodeInfo; HSAint32 m_xnack; + Assembler* m_pAsm; // @brief Executed before every test that uses KFDBaseComponentTest class and sets all common settings for the tests. virtual void SetUp();