[dev-util] Add symbolicate_dump endpoint to dev server
Add an endpoint to the dev server that will symbolicate a minidump.
BUG=chromium-os:29850
TEST=unit
TEST=run dev server, use curl to make it download some artifacts; check to see that debug symbols are staged in static/archive
TEST=once symbols are staged, run the dev server in your chroot and use curl with a minidump file like this:
TEST= curl -F minidump=@/home/cmasone/chromeos/phooey/powerd.20120424.141235.1005.dmp http://localhost:8080/symbolicate_dump
Change-Id: Id9ed6252da5a5452af1165088ebf1f477b3a736d
Reviewed-on: https://gerrit.chromium.org/gerrit/20980
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
diff --git a/devserver_util.py b/devserver_util.py
index eb498f4..e40ae7e 100644
--- a/devserver_util.py
+++ b/devserver_util.py
@@ -57,12 +57,15 @@
return full_payload_url, nton_payload_url, mton_payload_url
-def GatherArtifactDownloads(main_staging_dir, archive_url, build, build_dir):
+def GatherArtifactDownloads(main_staging_dir, archive_url, build, build_dir,
+ static_dir):
"""Generates artifacts that we mean to download and install for autotest.
This method generates the list of artifacts we will need for autotest. These
- artifacts are instances of downloadable_artifact.DownloadableArtifact.Note,
- these artifacts can be downloaded asynchronously iff !artifact.Synchronous().
+ artifacts are instances of downloadable_artifact.DownloadableArtifact.
+
+ Note, these artifacts can be downloaded asynchronously iff
+ !artifact.Synchronous().
"""
cmd = 'gsutil ls %s/*.bin' % archive_url
msg = 'Failed to get a list of payloads.'
@@ -87,6 +90,7 @@
mton_url, main_staging_dir, mton_payload))
# Next we gather the miscellaneous payloads.
+ debug_url = archive_url + '/' + downloadable_artifact.DEBUG_SYMBOLS
stateful_url = archive_url + '/' + downloadable_artifact.STATEFUL_UPDATE
autotest_url = archive_url + '/' + downloadable_artifact.AUTOTEST_PACKAGE
test_suites_url = (archive_url + '/' +
@@ -95,6 +99,8 @@
stateful_payload = os.path.join(build_dir,
downloadable_artifact.STATEFUL_UPDATE)
+ artifacts.append(downloadable_artifact.DebugTarball(
+ debug_url, main_staging_dir, static_dir))
artifacts.append(downloadable_artifact.DownloadableArtifact(
stateful_url, main_staging_dir, stateful_payload, synchronous=True))
artifacts.append(downloadable_artifact.AutotestTarball(