From: Daniel Dunbar Date: Mon, 22 Sep 2008 01:42:08 +0000 (+0000) Subject: scan-view tweak X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e673c08c3a1525b32e770d45fff3c4b4cf9b0be3;p=clang scan-view tweak - Require index.html in provided results directory. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56423 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/scan-view/scan-view b/tools/scan-view/scan-view index d12c251f8b..e005a26b40 100755 --- a/tools/scan-view/scan-view +++ b/tools/scan-view/scan-view @@ -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: