[devserver] Create/update timestamp when a build is used.
This timestamp will then be consumed by clean_staged_images.py to
determine when it is safe to wipe a build from the server.
BUG=chromium-os:32912
TEST=unit
Change-Id: I0c06dd55cd915332f7aa580d846adce4972f6223
Reviewed-on: https://gerrit.chromium.org/gerrit/28627
Tested-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Ready: Alex Miller <milleral@chromium.org>
diff --git a/downloader_unittest.py b/downloader_unittest.py
index a7ce2b8..0a4e4ed 100755
--- a/downloader_unittest.py
+++ b/downloader_unittest.py
@@ -193,6 +193,9 @@
self.assertTrue(downloader.Downloader.BuildStaged(archive_url,
self._work_dir))
+ self.assertTrue(os.path.exists(
+ os.path.join(os.path.join(self._work_dir, build_dir),
+ downloader.Downloader._TIMESTAMP_FILENAME)))
self.assertFalse(downloader.Downloader.BuildStaged(archive_url_non_staged,
self._work_dir))
def testTrybotBuildStaged(self):