diff options
-rw-r--r-- | lldb/test/lang/cpp/unique-types/TestUniqueTypes.py | 6 | ||||
-rw-r--r-- | lldb/test/lldbtest.py | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py b/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py index a1716b9f807..9dd6fdae104 100644 --- a/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py +++ b/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py @@ -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) diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py index e62b2b7105c..f29d947f6fd 100644 --- a/lldb/test/lldbtest.py +++ b/lldb/test/lldbtest.py @@ -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 |