[Lldb-commits] [lldb] r176546 - Fixed test suite errors due to new clang -v output.
Greg Clayton
gclayton at apple.com
Tue Mar 5 18:34:51 PST 2013
Author: gclayton
Date: Tue Mar 5 20:34:51 2013
New Revision: 176546
URL: http://llvm.org/viewvc/llvm-project?rev=176546&view=rev
Log:
Fixed test suite errors due to new clang -v output.
Modified:
lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py
lldb/trunk/test/lldbtest.py
Modified: lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py?rev=176546&r1=176545&r2=176546&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py (original)
+++ lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py Tue Mar 5 20:34:51 2013
@@ -34,14 +34,16 @@ class UniqueTypesTestCase(TestBase):
def unique_types(self):
"""Test for unique types of std::vector<long> and std::vector<short>."""
- if "clang" in self.getCompiler() and int(self.getCompilerVersion().split('.')[0]) < 3:
+ compiler = self.getCompiler()
+ compiler_basename = os.path.basename(compiler)
+ if "clang" in compiler_basename and int(self.getCompilerVersion().split('.')[0]) < 3:
self.skipTest("rdar://problem/9173060 lldb hangs while running unique-types for clang version < 3")
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
# GCC 4.6.3 (but not 4.4, 4.6.5 or 4.7) encodes two locations for the 'return 0' statement in main.cpp
- locs = 2 if "gcc" in self.getCompiler() and "4.6.3" in self.getCompilerVersion() else 1
+ locs = 2 if "gcc" in compiler_basename and "4.6.3" in self.getCompilerVersion() else 1
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=locs, loc_exact=True)
self.runCmd("run", RUN_SUCCEEDED)
Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=176546&r1=176545&r2=176546&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Tue Mar 5 20:34:51 2013
@@ -1024,11 +1024,7 @@ class Base(unittest2.TestCase):
compiler = self.getCompiler()
version_output = system([which(compiler), "-v"])[1]
for line in version_output.split(os.linesep):
- compiler_shortname = 'invalid'
- for c in ["clang", "LLVM", "gcc"]:
- if c in compiler:
- compiler_shortname = c
- m = re.search('%s version ([0-9\.]+)' % compiler_shortname, line)
+ m = re.search('version ([0-9\.]+)', line)
if m:
version = m.group(1)
return version
More information about the lldb-commits
mailing list