kfdtest: Instantiate Assembler in KFDBaseComponentTest

Instantiate in KFDBaseComponentTest::SetUp() and destroy in TearDown().
This ensures m_pAsm is available for all tests.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I8b98a5350a9739d71455f14552c9879bdb1c475d
This commit is contained in:
Graham Sider
2021-10-08 13:35:51 -04:00
committed by Harish Kasiviswanathan
parent 2f73db8fb0
commit 235636d598
2 changed files with 8 additions and 0 deletions
@@ -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
}