From 082719aecffe86afeabc2977d6d29628d4342120 Mon Sep 17 00:00:00 2001 From: Vishnu Khanth Date: Fri, 2 Aug 2024 17:23:36 +0530 Subject: [PATCH] refactor : Sysman init CTS * refactor sysman init tests into separate executable for isolated testing. Related-To: VLCLJ-2253 Signed-off-by: Vishnu Khanth --- .../sysman/test_sysman_init/CMakeLists.txt | 17 ++++------- ...an.cpp => test_init_sysman_after_core.cpp} | 0 ...e.cpp => test_init_sysman_before_core.cpp} | 0 .../src/test_init_sysman_via_core.cpp | 29 ------------------- 4 files changed, 5 insertions(+), 41 deletions(-) rename conformance_tests/sysman/test_sysman_init/src/{test_init_core_sysman.cpp => test_init_sysman_after_core.cpp} (100%) rename conformance_tests/sysman/test_sysman_init/src/{test_init_sysman_core.cpp => test_init_sysman_before_core.cpp} (100%) delete mode 100644 conformance_tests/sysman/test_sysman_init/src/test_init_sysman_via_core.cpp diff --git a/conformance_tests/sysman/test_sysman_init/CMakeLists.txt b/conformance_tests/sysman/test_sysman_init/CMakeLists.txt index 617d788e..b3523e59 100644 --- a/conformance_tests/sysman/test_sysman_init/CMakeLists.txt +++ b/conformance_tests/sysman/test_sysman_init/CMakeLists.txt @@ -13,25 +13,18 @@ add_lzt_test( LINK_LIBRARIES level_zero_tests::logging level_zero_tests::utils) add_lzt_test( - NAME test_init_core_sysman + NAME test_init_sysman_after_core GROUP "/conformance_tests/tools/sysman" SOURCES - src/test_init_core_sysman.cpp + src/test_init_sysman_after_core.cpp src/main.cpp LINK_LIBRARIES level_zero_tests::logging level_zero_tests::utils) add_lzt_test( - NAME test_init_sysman_core + NAME test_init_sysman_before_core GROUP "/conformance_tests/tools/sysman" SOURCES - src/test_init_sysman_core.cpp + src/test_init_sysman_before_core.cpp src/main.cpp LINK_LIBRARIES level_zero_tests::logging level_zero_tests::utils) - -add_lzt_test( - NAME test_init_sysman_via_core - GROUP "/conformance_tests/tools/sysman" - SOURCES - src/test_init_sysman_via_core.cpp - src/main.cpp - LINK_LIBRARIES level_zero_tests::logging level_zero_tests::utils) \ No newline at end of file + \ No newline at end of file diff --git a/conformance_tests/sysman/test_sysman_init/src/test_init_core_sysman.cpp b/conformance_tests/sysman/test_sysman_init/src/test_init_sysman_after_core.cpp similarity index 100% rename from conformance_tests/sysman/test_sysman_init/src/test_init_core_sysman.cpp rename to conformance_tests/sysman/test_sysman_init/src/test_init_sysman_after_core.cpp diff --git a/conformance_tests/sysman/test_sysman_init/src/test_init_sysman_core.cpp b/conformance_tests/sysman/test_sysman_init/src/test_init_sysman_before_core.cpp similarity index 100% rename from conformance_tests/sysman/test_sysman_init/src/test_init_sysman_core.cpp rename to conformance_tests/sysman/test_sysman_init/src/test_init_sysman_before_core.cpp diff --git a/conformance_tests/sysman/test_sysman_init/src/test_init_sysman_via_core.cpp b/conformance_tests/sysman/test_sysman_init/src/test_init_sysman_via_core.cpp deleted file mode 100644 index b9cda7c0..00000000 --- a/conformance_tests/sysman/test_sysman_init/src/test_init_sysman_via_core.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * Copyright (C) 2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "gtest/gtest.h" - -#include "logging/logging.hpp" -#include "utils/utils.hpp" -#include "test_harness/test_harness.hpp" - -#include - -namespace { - -TEST(SysmanInitTests, - GivenEnableSysmanEnvSetWhenCoreInitializedThenzesDriverGetWorks) { - static char sys_env[] = "ZES_ENABLE_SYSMAN=1"; - putenv(sys_env); - ASSERT_EQ(ZE_RESULT_SUCCESS, zeInit(0)); - uint32_t pCount = 0; - ASSERT_EQ(ZE_RESULT_SUCCESS, zesDriverGet(&pCount, nullptr)); - ASSERT_GT(pCount, 0); -} - -} // namespace \ No newline at end of file