mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
iotests: add 'qemu' package location to PYTHONPATH in testenv
We can drop the sys.path hacking in various places by doing this. Additionally, by doing it in one place right up top, we can print interesting warnings in case the environment does not look correct. (See next commit.) If we ever decide to change how the environment is crafted, all of the "help me find my python packages" goop is all in one place, right in one function. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20210923180715.4168522-2-jsnow@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
cc07162953
commit
af6d4c56e1
6 changed files with 14 additions and 23 deletions
|
@ -68,12 +68,6 @@ def run_linters():
|
|||
# Todo notes are fine, but fixme's or xxx's should probably just be
|
||||
# fixed (in tests, at least)
|
||||
env = os.environ.copy()
|
||||
qemu_module_path = os.path.join(os.path.dirname(__file__),
|
||||
'..', '..', 'python')
|
||||
try:
|
||||
env['PYTHONPATH'] += os.pathsep + qemu_module_path
|
||||
except KeyError:
|
||||
env['PYTHONPATH'] = qemu_module_path
|
||||
subprocess.run(('pylint-3', '--score=n', '--notes=FIXME,XXX', *files),
|
||||
env=env, check=False)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue