summaryrefslogtreecommitdiffstats
path: root/clang/tools/scan-view
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-09-21 23:02:25 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-09-21 23:02:25 +0000
commit19af4ea47b2b280355b5f1bf0b29ac29c9608363 (patch)
tree0be031f7dc625ae803817e9ce609d2257d7c154d /clang/tools/scan-view
parentf1280cf7444019f6be5e9a4f057b1217b909c3c6 (diff)
downloadbcm5719-llvm-19af4ea47b2b280355b5f1bf0b29ac29c9608363.tar.gz
bcm5719-llvm-19af4ea47b2b280355b5f1bf0b29ac29c9608363.zip
scan-view tweaks:
- Add simple favicon - Allow resolving source file paths (should be rethought) llvm-svn: 56414
Diffstat (limited to 'clang/tools/scan-view')
-rw-r--r--clang/tools/scan-view/ScanView.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/clang/tools/scan-view/ScanView.py b/clang/tools/scan-view/ScanView.py
index b9839eab45e..9e43ddf881c 100644
--- a/clang/tools/scan-view/ScanView.py
+++ b/clang/tools/scan-view/ScanView.py
@@ -24,6 +24,10 @@ kBugKeyValueRE = re.compile('<!-- BUG([^ ]*) (.*) -->')
kReportReplacements = [(kReportColRE, kReportColRepl),
(kReportBugRE, kReportBugRepl)]
+# Other simple parameters
+
+kResources = posixpath.join(posixpath.dirname(__file__), 'Resources')
+
###
__version__ = "0.1"
@@ -351,12 +355,27 @@ Method: <select id="reporter" name="reporter" onChange="updateReporterOptions()"
return self.send_report_submit()
else:
return self.send_404()
+ elif name=='favicon.ico':
+ if len(components)==1:
+ return self.send_path(posixpath.join(kResources,'bugcatcher.ico'))
+ else:
+ return self.send_404()
# Match directory entries.
if components[-1] == '':
components[-1] = 'index.html'
-
- path = posixpath.join(self.server.root, '/'.join(components))
+
+ suffix = '/'.join(components)
+
+ # The summary may reference source files on disk using rooted
+ # paths. Make sure these resolve correctly for now.
+ # FIXME: This isn't a very good idea... we should probably
+ # mark rooted paths somehow.
+ if os.path.exists(posixpath.join('/', suffix)):
+ path = posixpath.join('/', suffix)
+ else:
+ path = posixpath.join(self.server.root, suffix)
+
if self.server.options.debug > 1:
print >>sys.stderr, '%s: SERVER: sending path "%s"'%(sys.argv[0],
path)
OpenPOWER on IntegriCloud