diff -r 811ccdee6f87 Lib/distutils/tests/test_build_ext.py --- a/Lib/distutils/tests/test_build_ext.py Wed May 04 09:44:44 2016 +0300 +++ b/Lib/distutils/tests/test_build_ext.py Thu May 05 18:12:52 2016 +0200 @@ -20,6 +20,7 @@ # Don't load the xx module more than once. ALREADY_TESTED = False +cross_compiled = (sysconfig.get_config_var('cross_compiling') == 'yes') class BuildExtTestCase(TempdirManager, LoggingSilencer, @@ -40,6 +41,7 @@ def build_ext(self, *args, **kwargs): return build_ext(*args, **kwargs) + @unittest.skipIf(cross_compiled, 'interpreter is cross-compiled') def test_build_ext(self): global ALREADY_TESTED copy_xxmodule_c(self.tmp_dir) @@ -287,6 +289,7 @@ cmd.run() self.assertEqual(cmd.compiler, 'unix') + @unittest.skipIf(cross_compiled, 'interpreter is cross-compiled') def test_get_outputs(self): tmp_dir = self.mkdtemp() c_file = os.path.join(tmp_dir, 'foo.c') diff -r 811ccdee6f87 Lib/distutils/tests/test_config_cmd.py --- a/Lib/distutils/tests/test_config_cmd.py Wed May 04 09:44:44 2016 +0300 +++ b/Lib/distutils/tests/test_config_cmd.py Thu May 05 18:17:23 2016 +0200 @@ -7,6 +7,9 @@ from distutils.command.config import dump_file, config from distutils.tests import support from distutils import log +from distutils import sysconfig + +cross_compiled = (sysconfig.get_config_var('cross_compiling') == 'yes') class ConfigTestCase(support.LoggingSilencer, support.TempdirManager, @@ -37,6 +40,7 @@ dump_file(this_file, 'I am the header') self.assertEqual(len(self._logs), numlines+1) + @unittest.skipIf(cross_compiled, 'interpreter is cross-compiled') @unittest.skipIf(sys.platform == 'win32', "can't test on Windows") def test_search_cpp(self): pkg_dir, dist = self.create_dist() diff -r 811ccdee6f87 Lib/distutils/tests/test_install.py --- a/Lib/distutils/tests/test_install.py Wed May 04 09:44:44 2016 +0300 +++ b/Lib/distutils/tests/test_install.py Thu May 05 18:13:46 2016 +0200 @@ -18,6 +18,7 @@ from distutils.tests import support +cross_compiled = (sysconfig.get_config_var('cross_compiling') == 'yes') def _make_ext_name(modname): return modname + sysconfig.get_config_var('EXT_SUFFIX') @@ -195,6 +196,7 @@ 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] self.assertEqual(found, expected) + @unittest.skipIf(cross_compiled, 'interpreter is cross-compiled') def test_record_extensions(self): install_dir = self.mkdtemp() project_dir, dist = self.create_dist(ext_modules=[ diff -r 811ccdee6f87 Lib/distutils/tests/test_sysconfig.py --- a/Lib/distutils/tests/test_sysconfig.py Wed May 04 09:44:44 2016 +0300 +++ b/Lib/distutils/tests/test_sysconfig.py Fri May 06 09:44:19 2016 +0200 @@ -11,6 +11,8 @@ from distutils.tests import support from test.support import TESTFN, run_unittest, check_warnings +cross_compiled = (sysconfig.get_config_var('cross_compiling') == 'yes') + class SysconfigTestCase(support.EnvironGuard, unittest.TestCase): def setUp(self): super(SysconfigTestCase, self).setUp() @@ -39,6 +41,7 @@ self.assertNotEqual(sysconfig.get_python_lib(), sysconfig.get_python_lib(prefix=TESTFN)) + @unittest.skipIf(cross_compiled, 'interpreter is cross-compiled') def test_get_python_inc(self): inc_dir = sysconfig.get_python_inc() # This is not much of a test. We make sure Python.h exists