diff -r eee959fee5f5 Lib/distutils/tests/test_spawn.py --- a/Lib/distutils/tests/test_spawn.py Sat May 07 21:13:50 2016 +0300 +++ b/Lib/distutils/tests/test_spawn.py Fri May 20 11:32:01 2016 +0200 @@ -1,7 +1,7 @@ """Tests for distutils.spawn.""" import unittest import os -from test.support import run_unittest +from test.support import run_unittest, is_android from distutils.spawn import _nt_quote_args from distutils.spawn import spawn @@ -31,7 +31,10 @@ # through the shell that returns 1 if os.name == 'posix': exe = os.path.join(tmpdir, 'foo.sh') - self.write_file(exe, '#!/bin/sh\nexit 1') + if is_android: + self.write_file(exe, '#!/system/bin/sh\nexit 1') + else: + self.write_file(exe, '#!/bin/sh\nexit 1') else: exe = os.path.join(tmpdir, 'foo.bat') self.write_file(exe, 'exit 1') @@ -42,7 +45,10 @@ # now something that works if os.name == 'posix': exe = os.path.join(tmpdir, 'foo.sh') - self.write_file(exe, '#!/bin/sh\nexit 0') + if is_android: + self.write_file(exe, '#!/system/bin/sh\nexit 0') + else: + self.write_file(exe, '#!/bin/sh\nexit 0') else: exe = os.path.join(tmpdir, 'foo.bat') self.write_file(exe, 'exit 0')