cpython: 31349bc40214 (original) (raw)
Mercurial > cpython
changeset 78239:31349bc40214
Issue #15184: Fix test__remove_unsupported_archs failures on 10.6 by removing unwarranted assumptions that clang compiler chain cannot handle ppc (the driver passes off ppc compiles to gcc). Mock the behavior instead. [#15184]
Ned Deily nad@acm.org | |
---|---|
date | Sat, 21 Jul 2012 22:35:16 -0700 |
parents | e683084c8bb9 |
children | f4470babf79b |
files | Lib/test/test__osx_support.py |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-)[+] [-] Lib/test/test__osx_support.py 10 |
line wrap: on
line diff
--- a/Lib/test/test__osx_support.py +++ b/Lib/test/test__osx_support.py @@ -173,7 +173,6 @@ class Test_OSXSupport(unittest.TestCase) _osx_support._remove_universal_flags( config_vars))
- @unittest.skipUnless(shutil.which('clang'),'test requires clang') def test__remove_unsupported_archs(self): config_vars = { 'CC': 'clang',
@@ -195,6 +194,15 @@ class Test_OSXSupport(unittest.TestCase) } self.add_expected_saved_initial_values(config_vars, expected_vars)
suffix = (':' + self.env['PATH']) if self.env['PATH'] else ''[](#l1.15)
self.env['PATH'] = os.path.abspath(self.temp_path_dir) + suffix[](#l1.16)
c_name = 'clang'[](#l1.17)
test.support.unlink(c_name)[](#l1.18)
self.addCleanup(test.support.unlink, c_name)[](#l1.19)
# exit status 255 means no PPC support in this compiler chain[](#l1.20)
with open(c_name, 'w') as f:[](#l1.21)
f.write("#!/bin/sh\nexit 255")[](#l1.22)
os.chmod(c_name, stat.S_IRWXU)[](#l1.23) self.assertEqual(expected_vars,[](#l1.24) _osx_support._remove_unsupported_archs([](#l1.25) config_vars))[](#l1.26)