diff -r 811ccdee6f87 Lib/distutils/tests/test_spawn.py --- a/Lib/distutils/tests/test_spawn.py Wed May 04 09:44:44 2016 +0300 +++ b/Lib/distutils/tests/test_spawn.py Thu May 05 18:32:12 2016 +0200 @@ -1,6 +1,7 @@ """Tests for distutils.spawn.""" import unittest import os +import platform from test.support import run_unittest from distutils.spawn import _nt_quote_args @@ -31,7 +32,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 platform.android_ver()[0]: + 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 +46,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 platform.android_ver()[0]: + 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')