tests: allow pytests to run in out-of-tree builds

Some of the files it needs are in the build directory but the code did
not make a distinction.

Closes #15257
This commit is contained in:
Dan Fandrich 2024-10-10 10:44:56 -07:00
parent 79809ffe1e
commit a3601cf571
3 changed files with 9 additions and 6 deletions

View file

@ -44,7 +44,7 @@ class LocalClient:
timeout: Optional[float] = None,
run_env: Optional[Dict[str,str]] = None):
self.name = name
self.path = os.path.join(env.project_dir, f'tests/http/clients/{name}')
self.path = os.path.join(env.build_dir, f'tests/http/clients/{name}')
self.env = env
self._run_env = run_env
self._timeout = timeout if timeout else env.test_timeout