Fix a path concatenation issue related to windows paths.
authorZachary Turner <zturner@google.com>
Tue, 14 Oct 2014 21:54:14 +0000 (21:54 +0000)
committerZachary Turner <zturner@google.com>
Tue, 14 Oct 2014 21:54:14 +0000 (21:54 +0000)
llvm-svn: 219730

lldb/test/lldbtest.py

index a06990c..deedf2a 100644 (file)
@@ -1148,7 +1148,11 @@ class Base(unittest2.TestCase):
                              os.environ["LLDB_SESSION_DIRNAME"])
         if not os.path.isdir(dname):
             os.mkdir(dname)
-        fname = os.path.join(dname, "%s-%s-%s-%s.log" % (prefix, self.getArchitecture(), "_".join(self.getCompiler().split('/')), self.id()))
+        compiler = self.getCompiler()
+        if compiler[1] == ':':
+            compiler = compiler[2:]
+
+        fname = os.path.join(dname, "%s-%s-%s-%s.log" % (prefix, self.getArchitecture(), "_".join(compiler.split(os.path.sep)), self.id()))
         with open(fname, "w") as f:
             import datetime
             print >> f, "Session info generated @", datetime.datetime.now().ctime()