summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2021-01-29 10:06:16 +0100
committerKevin Wolf2021-01-29 12:32:36 +0100
commit9da4a314a0d0c4722a3e48db88a9f5f9fe1cffb9 (patch)
tree2f3787d8efd35f78088d8614b3bba91b2930e6fb /tests/qemu-iotests
parentMerge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-for-6.0-pul... (diff)
downloadqemu-9da4a314a0d0c4722a3e48db88a9f5f9fe1cffb9.tar.gz
qemu-9da4a314a0d0c4722a3e48db88a9f5f9fe1cffb9.tar.xz
qemu-9da4a314a0d0c4722a3e48db88a9f5f9fe1cffb9.zip
iotests/testrunner: fix recognition of python tests
We should drop final '\n' before comparing with python3 shebang. Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628 Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20210129090616.84145-1-vsementsov@virtuozzo.com> Tested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests')
-rw-r--r--tests/qemu-iotests/testrunner.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
index a581be6a29..24b3fba115 100644
--- a/tests/qemu-iotests/testrunner.py
+++ b/tests/qemu-iotests/testrunner.py
@@ -248,7 +248,7 @@ class TestRunner(ContextManager['TestRunner']):
with f_test.open(encoding="utf-8") as f:
try:
- if f.readline() == '#!/usr/bin/env python3':
+ if f.readline().rstrip() == '#!/usr/bin/env python3':
args.insert(0, self.env.python)
except UnicodeDecodeError: # binary test? for future.
pass