[analyzer] SATestBuild: Don't require reference results to have logs.
authorJordan Rose <jordan_rose@apple.com>
Mon, 10 Jun 2013 19:34:30 +0000 (19:34 +0000)
committerJordan Rose <jordan_rose@apple.com>
Mon, 10 Jun 2013 19:34:30 +0000 (19:34 +0000)
The Logs directory isn't used for testing, so it's filtered out ahead of
time. However, there's then no reason to include it in version control at
all. Don't error if it's not present.

llvm-svn: 183689

clang/utils/analyzer/SATestBuild.py

index 8e09a7adab4d9e92d8c06b82935a3a291bd6f2b9..eb7796431a18b3c5fe4ed0577eb08fe87baff980 100755 (executable)
@@ -413,8 +413,10 @@ def runCmpResults(Dir):
     RefList = glob.glob(RefDir + "/*") 
     NewList = glob.glob(NewDir + "/*")
     
-    # Log folders are also located in the results dir, so ignore them. 
-    RefList.remove(os.path.join(RefDir, LogFolderName))
+    # Log folders are also located in the results dir, so ignore them.
+    RefLogDir = os.path.join(RefDir, LogFolderName)
+    if RefLogDir in RefList:
+        RefList.remove(RefLogDir)
     NewList.remove(os.path.join(NewDir, LogFolderName))
     
     if len(RefList) == 0 or len(NewList) == 0: