File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -284,9 +284,11 @@ jobs:
284284 if : matrix.suite == 'rest'
285285 run : |
286286 ./scripts/install-pti.sh
287+ PTI_LIBS_DIR=$(python ./scripts/pti_lib.py)
288+ ls $PTI_LIBS_DIR
287289 LEVEL_ZERO_LIB=$(pwd)/.scripts_cache/level_zero_for_pti/level-zero-1.24.2/build/lib/
288290 ls $LEVEL_ZERO_LIB
289- export LD_LIBRARY_PATH=$LEVEL_ZERO_LIB:$LD_LIBRARY_PATH
291+ export LD_LIBRARY_PATH=$PTI_LIBS_DIR:$ LEVEL_ZERO_LIB:$LD_LIBRARY_PATH
290292 cd third_party/proton/test
291293 pytest test_api.py test_cmd.py test_lib.py test_profile.py test_viewer.py --device xpu -s -v
292294 cd ..
Original file line number Diff line number Diff line change 1+ """Prints a lib directory for pti."""
2+
3+ import importlib .metadata
4+ import pathlib
5+
6+
7+ def get_pti_lib_path () -> pathlib .Path :
8+ """Returns library path for pti.
9+
10+ Raises:
11+ importlib.metadata.PackageNotFoundError: if 'intel-pti' not installed.
12+ AssertionError: if libpti_view.so not found.
13+ """
14+ files = importlib .metadata .files ('intel-pti' ) or []
15+ for f in files :
16+ if f .name == 'libpti_view.so' :
17+ return pathlib .Path (f .locate ()).parent .resolve ()
18+ raise AssertionError ('libpti_view.so not found' )
19+
20+
21+ if __name__ == '__main__' :
22+ print (get_pti_lib_path ())
You can’t perform that action at this time.
0 commit comments