diff options
author | John Snow <jsnow@redhat.com> | 2021-09-23 14:07:10 -0400 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2021-10-06 10:25:55 +0200 |
commit | af6d4c56e15a45fb4d0cdf8d0335275b5ed8fbf7 (patch) | |
tree | cef8379ac848324eb29d55624d702a5b092379f2 /tests/qemu-iotests/297 | |
parent | cc071629539dc1f303175a7e2d4ab854c0a8b20f (diff) | |
download | qemu-af6d4c56e15a45fb4d0cdf8d0335275b5ed8fbf7.zip qemu-af6d4c56e15a45fb4d0cdf8d0335275b5ed8fbf7.tar.gz qemu-af6d4c56e15a45fb4d0cdf8d0335275b5ed8fbf7.tar.bz2 |
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>
Diffstat (limited to 'tests/qemu-iotests/297')
-rwxr-xr-x | tests/qemu-iotests/297 | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297 index b04cba5..467b712 100755 --- a/tests/qemu-iotests/297 +++ b/tests/qemu-iotests/297 @@ -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) |