]> granicus.if.org Git - clang/commitdiff
scan-view tweak
authorDaniel Dunbar <daniel@zuster.org>
Mon, 22 Sep 2008 01:42:08 +0000 (01:42 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 22 Sep 2008 01:42:08 +0000 (01:42 +0000)
 - Require index.html in provided results directory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56423 91177308-0d34-0410-b5e6-96231b3b80d8

tools/scan-view/scan-view

index d12c251f8bec543036f1ee2fbf36a809b007f9d1..e005a26b40f4fe3ff6e69d6c37c91e03c8ecd2e0 100755 (executable)
@@ -4,6 +4,7 @@
 """
 
 import sys
+import posixpath
 import thread
 import time
 import urllib
@@ -85,9 +86,13 @@ def  main():
     (options, args) = parser.parse_args()
 
     if len(args) != 1:
-        parser.error('invalid number of arguments.')
+        parser.error('No results directory specified.')
     root, = args
 
+    # Make sure this directory is in a reasonable state to view.
+    if not posixpath.exists(posixpath.join(root,'index.html')):
+        parser.error('Invalid directory, analysis results not found!')
+
     # Kick off thread to wait for server and start web browser, if
     # requested.
     if options.startBrowser: