[Lldb-commits] [PATCH] D16049: [LLDB][MIPS] A small fix in GetBreakableLoadAddress() for MIPS
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 19 10:15:02 PST 2016
clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.
Just factor the cool archs stuff into a function that others can use and this is good to go.
================
Comment at: packages/Python/lldbsuite/test/lldbtest.py:1040-1049
@@ -1039,7 +1039,12 @@
self = args[0]
- if self.getArchitecture() not in archlist:
+ retype = type(re.compile('hello, world'))
+ if isinstance(archs, list) and self.getArchitecture() not in archs:
self.skipTest("skipping for architecture %s (requires one of %s)" %
- (self.getArchitecture(), ", ".join(archlist)))
+ (self.getArchitecture(), ", ".join(archs)))
+ elif isinstance(archs, basestring) and self.getArchitecture() != archs:
+ self.skipTest("skipping for architecture %s" % (self.getArchitecture()))
+ elif isinstance(archs, retype) and not re.match(archs, self.getArchitecture()):
+ self.skipTest("skipping for architecture %s" % (self.getArchitecture()))
else:
func(*args, **kwargs)
return wrapper
----------------
It would be nice to put this code that handles "archs" into a separate function:
```
def matchArchitectures(archs):
# All code from above
```
Then have your code call it. This way other function can use this cool new functionality for testing archs since many many other skip decorator functions use "archs" in their arguments.
Repository:
rL LLVM
http://reviews.llvm.org/D16049
More information about the lldb-commits
mailing list