Don't generate lldb inline test Makefiles if Makefile already exists.
authorZachary Turner <zturner@google.com>
Fri, 19 Dec 2014 18:26:33 +0000 (18:26 +0000)
committerZachary Turner <zturner@google.com>
Fri, 19 Dec 2014 18:26:33 +0000 (18:26 +0000)
Differential Revision: http://reviews.llvm.org/D6664
Reviewed by: Sean Callanan

llvm-svn: 224593

lldb/test/lldbinline.py

index 868b695..37c57f3 100644 (file)
@@ -67,6 +67,9 @@ class CommandParser:
                 return
 
 def BuildMakefile(mydir):
+    if os.path.exists("Makefile"):
+        return
+
     categories = {}
 
     for f in os.listdir(os.getcwd()):
@@ -98,8 +101,8 @@ def BuildMakefile(mydir):
     makefile.close()
 
 def CleanMakefile():
-    if (os.path.isfile("Makefile")):
-        os.unlink("Makefile")
+    # Do nothing for now, since the Makefile on disk could be checked into the repo.
+    pass
 
 class InlineTest(TestBase):
     # Internal implementation