Skip to content

Commit

Permalink
iotests/testrunner: fix recognition of python tests
Browse files Browse the repository at this point in the history
We should drop final '\n' before comparing with python3 shebang.

Fixes: d74c754
Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Message-Id: <[email protected]>
Tested-by: Thomas Huth <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
  • Loading branch information
Vladimir Sementsov-Ogievskiy authored and kevmw committed Jan 29, 2021
1 parent 5101d00 commit 9da4a31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/qemu-iotests/testrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def do_run_test(self, test: str) -> TestResult:

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
Expand Down

0 comments on commit 9da4a31

Please sign in to comment.