Skip to content

Commit cd39e02

Browse files
authored
Merge pull request #101 from testing-cabal/exec-test-case-fix
Fix ExecTestCase to properly handle shell scripts
2 parents 01fd6cf + 4a861cb commit cd39e02

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

python/subunit/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -907,12 +907,7 @@ def debug(self):
907907

908908
def _run(self, result):
909909
protocol = TestProtocolServer(result)
910-
# Explicitly invoke Python to run the script instead of relying on
911-
# execute permissions, which may not be preserved during installation
912-
import shlex
913-
914-
script_parts = shlex.split(self.script)
915-
process = subprocess.Popen([sys.executable] + script_parts, stdout=subprocess.PIPE)
910+
process = subprocess.Popen(self.script, shell=True, stdout=subprocess.PIPE)
916911
make_stream_binary(process.stdout)
917912
output = process.communicate()[0]
918913
protocol.readFrom(BytesIO(output))

0 commit comments

Comments
 (0)