aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Malea <daniel.malea@intel.com>2013-08-06 20:51:41 +0000
committerDaniel Malea <daniel.malea@intel.com>2013-08-06 20:51:41 +0000
commite0d9e7543b684ffedabc9b39f4e4910eb975099e (patch)
tree8b82df1c7856ff37ea4b659be34ac9a00baaefdc
parent31cdd3d8545077cd5cdb6873bf005508a1570d38 (diff)
downloadlldb-e0d9e7543b684ffedabc9b39f4e4910eb975099e.tar.gz
Centralizing Intel compiler detection logic in lldbtest.py to avoid duplication in the future.
- Addresses review comments from Stefanus! git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187816 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/functionalities/thread/step_out/TestThreadStepOut.py2
-rw-r--r--test/lldbtest.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/test/functionalities/thread/step_out/TestThreadStepOut.py b/test/functionalities/thread/step_out/TestThreadStepOut.py
index ac8d15e17..12cbd806c 100644
--- a/test/functionalities/thread/step_out/TestThreadStepOut.py
+++ b/test/functionalities/thread/step_out/TestThreadStepOut.py
@@ -56,7 +56,7 @@ class ThreadStepOutTestCase(TestBase):
TestBase.setUp(self)
# Find the line number for our breakpoint.
self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
- if any([x in self.getCompiler() for x in ["gcc", "icc", "icpc", "icl"]]):
+ if "gcc" in self.getCompiler() or self.isIntelCompiler():
self.step_out_destination = line_number('main.cpp', '// Expect to stop here after step-out (icc and gcc)')
else:
self.step_out_destination = line_number('main.cpp', '// Expect to stop here after step-out (clang)')
diff --git a/test/lldbtest.py b/test/lldbtest.py
index 32d51b7b1..c6fb79860 100644
--- a/test/lldbtest.py
+++ b/test/lldbtest.py
@@ -1255,6 +1255,10 @@ class Base(unittest2.TestCase):
version = m.group(1)
return version
+ def isIntelCompiler(self):
+ """ Returns true if using an Intel (ICC) compiler, false otherwise. """
+ return any([x in self.getCompiler() for x in ["icc", "icpc", "icl"]])
+
def expectedCompilerVersion(self, compiler_version):
"""Returns True iff compiler_version[1] matches the current compiler version.
Use compiler_version[0] to specify the operator used to determine if a match has occurred.