Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 015ab5f

Browse files
author
Zachary Turner
committedNov 16, 2015
Python 3 - Skip a certain test for a particular (swig,python) combo.
Current versions of SWIG have a bug with Python 3 that causes Python to assert when iterating over a generator. This patch skips the test for the right combination of Python version and SWIG version. I'm attempting to upstream a patch to SWIG to fix this in a subsequent as-of-yet unreleased version, but I don't know how long that will take. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@253273 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 03a3dd9 commit 015ab5f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
 

‎packages/Python/lldbsuite/test/lldbtest.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
from distutils.version import LooseVersion
4141
import gc
4242
import glob
43+
import inspect
4344
import os, sys, traceback
4445
import os.path
4546
import re
@@ -1109,7 +1110,13 @@ def fn(self):
11091110
debug_info_passes and
11101111
swig_version_passes and
11111112
py_version_passes)
1112-
return skipTestIfFn(fn, bugnumber, skipReason="skipping because os:%s compiler: %s %s arch: %s debug info: %s"%(oslist, compiler, compiler_version, archs, debug_info))
1113+
1114+
local_vars = locals()
1115+
args = [x for x in inspect.getargspec(skipIf).args]
1116+
arg_vals = [eval(x, globals(), local_vars) for x in args]
1117+
args = [x for x in zip(args, arg_vals) if x[1] is not None]
1118+
reasons = ['%s=%s' % (x, str(y)) for (x,y) in args]
1119+
return skipTestIfFn(fn, bugnumber, skipReason='skipping because ' + ' && '.join(reasons))
11131120

11141121
def skipIfDebugInfo(bugnumber=None, debug_info=None):
11151122
return skipIf(bugnumber=bugnumber, debug_info=debug_info)

‎packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ def test_SBListener(self):
227227

228228
@add_test_categories(['pyapi'])
229229
@no_debug_info_test
230+
# Py3 asserts due to a bug in SWIG. Trying to upstream a patch to fix this in 3.0.8
231+
@skipIf(py_version=['>=', (3,0)], swig_version=['<', (3,0,8)])
230232
def test_SBModule(self):
231233
obj = lldb.SBModule()
232234
if self.TraceOn():

0 commit comments

Comments
 (0)
This repository has been archived.