]> granicus.if.org Git - python/commitdiff
Issue #16698: Skip posix test_getgroups when built with OS X
authorNed Deily <nad@acm.org>
Sat, 2 Feb 2013 23:08:52 +0000 (15:08 -0800)
committerNed Deily <nad@acm.org>
Sat, 2 Feb 2013 23:08:52 +0000 (15:08 -0800)
deployment target prior to 10.6.

Lib/test/test_posix.py
Misc/NEWS

index b936dda44bc4b51c5d0a2ba89bbfe5c53c67c7cb..06ad5c8763328f37170d2085845e5fece6885956 100644 (file)
@@ -447,6 +447,13 @@ class PosixTester(unittest.TestCase):
         if ret != None or not groups:
             raise unittest.SkipTest("need working 'id -G'")
 
+        # Issues 16698: OS X ABIs prior to 10.6 have limits on getgroups()
+        if sys.platform == 'darwin':
+            import sysconfig
+            dt = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') or '10.0'
+            if float(dt) < 10.6:
+                raise unittest.SkipTest("getgroups(2) is broken prior to 10.6")
+
         # 'id -G' and 'os.getgroups()' should return the same
         # groups, ignoring order and duplicates.
         # #10822 - it is implementation defined whether posix.getgroups()
index d23ab200a0234959f424e0f960b82d461a67559b..382cd7fd9603fc2962df94dd19e2dbddf4083bf2 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -908,6 +908,9 @@ Tests
 - Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing
   a test failure in test_ssl.
 
+- Issue #16698: Skip posix test_getgroups when built with OS X
+  deployment target prior to 10.6.
+
 Build
 -----