iotests/testrunner: fix recognition of python tests
PATCH 1/1 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 <[email protected]>
--- tests/qemu-iotests/testrunner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/testrunner.py +1 -1
@@ -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
Signature · 1 line
2.29.2
Quoted 13 lines · Vladimir Sementsov-Ogievskiy
We should drop final '\n' before comparing with python3 shebang.
Fixes d74c754c924ca34e90b7c96ce2f5609d82c0e628Signed-off-by Vladimir Sementsov-Ogievskiy <[email protected]>--- tests/qemu-iotests/testrunner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qemu-iotests/testrunner.py +0
-0
tests/qemu-iotests/testrunner.py class TestRunner(ContextManager['TestRunner']): · line 254
Quoted 8 lines
tests/qemu-iotests/testrunner.py +1
-1@@ -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
Together with your other patch, this fixes "make vm-build-netbsd" for me, thanks!
Tested-by Thomas Huth <[email protected]>
Kevin Wolf
AppliedAm 29.01.2021 um 10:06 hat Vladimir Sementsov-Ogievskiy geschrieben:
Quoted 4 lines
We should drop final '\n' before comparing with python3 shebang.
Fixes d74c754c924ca34e90b7c96ce2f5609d82c0e628Signed-off-by Vladimir Sementsov-Ogievskiy <[email protected]>
Thanks, applied to the block branch.
Kevin
Quoted 4 lines · Vladimir Sementsov-Ogievskiy
We should drop final '\n' before comparing with python3 shebang.
Fixes d74c754c924ca34e90b7c96ce2f5609d82c0e628Signed-off-by Vladimir Sementsov-Ogievskiy <[email protected]>
Reviewed-by John Snow <[email protected]>
Quoted 18 lines
--- tests/qemu-iotests/testrunner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qemu-iotests/testrunner.py +1
-1@@ -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