Skip to content

Commit

Permalink
DAOS-13225 test: Allow speciying Python lib search…
Browse files Browse the repository at this point in the history
In mpiio tests.  Placeholder value $python_lib will be replaced with the
test tool location as found in the Python library search path.

Quick-functional: true
Provisioning-pool: bmurrell-automate
EL9-VM9-label: stage_vm9
Repo-files-PR: PR-16
PR-repos-ubuntu20: hdf5@PR-38:8 ior@PR-10:7 hdf5-vol-daos@PR-38:14 mpifileutils-pkg@PR-34:7
PR-repos-el8: dpdk@master spdk@master:lastBuild testmpio@PR-9:lastBuild
PR-repos-el9: testmpio@PR-9:lastBuild
PR-repos-leap15: testmpio@PR-9:lastBuild
PR-repos: argobots@PR-24 raft@PR-72 isa-l@PR-11 isa-l_crypto@PR-9 mercury@PR-102:lastBuild dpdk@PR-26 spdk@PR-59:lastBuild mpich@PR-64 hdf5@PR-39:lastBuild ior@PR-10:lastBuild dtcmp@PR-6:lastBuild lwgrp@PR-6 libcircle@PR-6:lastBuild hdf5-vol-daos@PR-38:lastBuild mpifileutils-pkg@PR-34:lastBuild MACSio@PR-12:lastBuild json-cwx@PR-4 simul@PR-3 romio@PR-10:lastBuild mpi4py@PR-11:lastBuild
Skip-build-el8-rpm: false
Skip-build-leap15-rpm: false
Skip-build-el8-gcc: true
Skip-build-el8-gcc-debug: true
Skip-build-el8-gcc-release: true
Skip-build-leap15-gcc: true
Skip-build-leap15-icc: true
Skip-build-ubuntu-clang: true
Skip-func-test-leap15: false
Skip-func-hw-test: true
Test-tag: test_daos_dfuse_unit_pil4dfs dfuse_mu test_mpi4py
Fixes: DAOS-12427

Required-githooks: true

Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
  • Loading branch information
brianjmurrell committed Jun 6, 2023
1 parent 359b92c commit ca1712f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/tests/ftest/mpiio/llnl_mpi4py.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ client_processes:
np: 8
test_repo:
llnl: "testmpio"
mpi4py: "/usr/lib64/python3.6/site-packages/mpi4py/tests"
mpi4py: "$python_lib/mpi4py/tests"
12 changes: 12 additions & 0 deletions src/tests/ftest/util/mpiio_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""
import os
import site

from apricot import TestWithServers

Expand Down Expand Up @@ -68,6 +69,17 @@ def run_test(self, test_repo, test_name):
for kwargs in kwargs_list:
manager = get_job_manager(self)

# replace python lib path place holder with real python path
if kwargs['path'].contains("$python_lib"):
kwargs['path'] = None
for path in site.getsitepackages():
test_path = path.replace('$python_lib', path)
if os.path.isfile(os.path.join(test_path, test_name)):
kwargs['path'] = test_path
break
if not kwargs['path']:
self.fail("Could not find {0} in repo {1}".format(test_name, test_repo))

# fix up a relative test_repo specification
if not kwargs["path"].startswith("/"):
mpi_path = os.path.split(manager.command_path)[0]
Expand Down

0 comments on commit ca1712f

Please sign in to comment.