Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d943a8c
feature: Add more APIs to L0 Sysman python binding
aviralni May 19, 2026
fee3dbf
feature: Add more APIs to L0 Sysman python binding
aviralni May 19, 2026
150fd84
feature: Add more APIs to L0 Sysman python binding
aviralni May 19, 2026
f7bee3a
feature: Add more APIs to L0 Sysman python binding
aviralni May 19, 2026
456566c
feature: Add more APIs to L0 Sysman python binding
aviralni May 19, 2026
4ef7818
feature: Add new APIs to pyzes
aviralni May 27, 2026
a406994
feature: Add new APIs to pyzes
aviralni May 27, 2026
377fcb6
Merge branch 'oneapi-src:master' into master
aviralni Jun 3, 2026
1fa65f1
feature: Add more APIs to L0 Sysman python binding
aviralni Jun 3, 2026
1ae486c
feature: Add more APIs to L0 Sysman python binding
aviralni Jun 3, 2026
c8c6ba8
feature: Add more APIs to L0 Sysman python binding
aviralni Jun 3, 2026
ca14367
feature: Add more APIs to L0 Sysman python binding
aviralni Jun 4, 2026
c040cff
feature: Add more APIs to L0 Sysman python binding
aviralni Jun 4, 2026
1340ee7
Merge branch 'master' into master
aviralni Jun 5, 2026
174d4eb
Merge branch 'master' into master
aviralni Jun 5, 2026
26fc29f
Merge branch 'master' into master
aviralni Jun 5, 2026
5fea1ca
Merge branch 'master' into master
aviralni Jun 5, 2026
fc07360
Merge branch 'master' into master
aviralni Jun 5, 2026
20b37f4
Merge branch 'master' into master
aviralni Jun 10, 2026
27b4eb4
feature: Add more APIs to L0 Sysman python binding
aviralni Jun 10, 2026
ddfcc79
feature: Add new GTEST pattern tests for pyzes
aviralni Jun 10, 2026
87fc63e
feature: Add new GTEST pattern tests for pyzes
aviralni Jun 10, 2026
f38a838
feature: Add new GTEST pattern tests for pyzes
aviralni Jun 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions bindings/sysman/python/source/cts_tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
##
# Copyright (C) 2026 Intel Corporation

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this under test/
instead of cts_tests folder name , please make it as blackbox_tests

Rename "pyzes_black_box_test.py" to pyzes_examples.py

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

#
# SPDX-License-Identifier: MIT
#
##

import os
import sys
from ctypes import byref, c_uint32

import pytest

CTS_TESTS_DIR = os.path.dirname(os.path.abspath(__file__))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename all the variables.
Lets avoid CTS to avoid confusion with actual conformance tests

SOURCE_DIR = os.path.abspath(os.path.join(CTS_TESTS_DIR, ".."))

if SOURCE_DIR not in sys.path:
sys.path.insert(0, SOURCE_DIR)


@pytest.fixture(scope="session")
def pyzes_module():
try:
import pyzes as pz
except (ImportError, OSError) as exc:
pytest.skip(f"pyzes is not available for CTS validation: {exc}")

return pz


@pytest.fixture(scope="session")
def sysman_devices(pyzes_module):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the meaning of "conftest" ?
Is it config tests ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conformance

pz = pyzes_module

rc = pz.zesInit(0)
if rc != pz.ZE_RESULT_SUCCESS:
pytest.skip(f"zesInit failed with ze_result_t={rc}")

driver_count = c_uint32(0)
rc = pz.zesDriverGet(byref(driver_count), None)
if rc != pz.ZE_RESULT_SUCCESS:
pytest.skip(f"zesDriverGet(count) failed with ze_result_t={rc}")

if driver_count.value == 0:
pytest.skip("No Sysman drivers available")

DriverArray = pz.zes_driver_handle_t * driver_count.value
drivers = DriverArray()
rc = pz.zesDriverGet(byref(driver_count), drivers)
if rc != pz.ZE_RESULT_SUCCESS:
pytest.skip(f"zesDriverGet(handles) failed with ze_result_t={rc}")

devices = []
for driver in drivers:
device_count = c_uint32(0)
rc = pz.zesDeviceGet(driver, byref(device_count), None)
if rc != pz.ZE_RESULT_SUCCESS:
continue

if device_count.value == 0:
continue

DeviceArray = pz.zes_device_handle_t * device_count.value
driver_devices = DeviceArray()
rc = pz.zesDeviceGet(driver, byref(device_count), driver_devices)
if rc != pz.ZE_RESULT_SUCCESS:
continue

devices.extend(driver_devices)

if not devices:
pytest.skip("No Sysman devices available")

return devices
Loading
Loading