summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiva Chandra <sivachandra@google.com>2015-01-09 01:54:44 +0000
committerSiva Chandra <sivachandra@google.com>2015-01-09 01:54:44 +0000
commit5cb4775533a023d3443b8983bfbec0e088cb9005 (patch)
tree4d709d441078a45150ecce1aca67a72198aa156d
parentfdc72e4ef80b69bcb89b8b5b73d0d28fd14e2800 (diff)
[InlineTest] getRerunArgs returns an empty string if the test was skipped.
Summary: The main issue that this patch is trying to address is that the current implementation of getRerunArgs of InlineTest relies on the attribute 'using_dsym' which could be absent if the test was skipped altogether. [That is, if both dsym and dwarf tests were skipped.] While at it, the use of deprecated Python module 'new' is eliminated. Test Plan: [Linux] dotest.py -p TestExprPathSynthetic Reviewers: vharron, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6888 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@225496 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/lldbinline.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/lldbinline.py b/test/lldbinline.py
index 21b716aa0..ca8a86683 100644
--- a/test/lldbinline.py
+++ b/test/lldbinline.py
@@ -2,7 +2,6 @@ import lldb
from lldbtest import *
import lldbutil
import os
-import new
import unittest2
import sys
@@ -72,7 +71,10 @@ class InlineTest(TestBase):
def getRerunArgs(self):
# The -N option says to NOT run a if it matches the option argument, so
# if we are using dSYM we say to NOT run dwarf (-N dwarf) and vice versa.
- if self.using_dsym:
+ if self.using_dsym is None:
+ # The test was skipped altogether.
+ return ""
+ elif self.using_dsym:
return "-N dwarf %s" % (self.mydir)
else:
return "-N dsym %s" % (self.mydir)
@@ -179,7 +181,7 @@ def MakeInlineTest(__file, __globals, decorators=None):
test_name, _ = os.path.splitext(file_basename)
# Build the test case
- test = new.classobj(test_name, (InlineTest,), {})
+ test = type(test_name, (InlineTest,), {'using_dsym': None})
test.name = test_name
test.test_with_dsym = ApplyDecoratorsToFunction(test._InlineTest__test_with_dsym, decorators)