Hide xBuddy build/images management behind a flag.
xBuddy should only manage the images in the local build/images directory
if devserver is run with that explicitly set by a flag.
i.e. if the -x flag isn't set for devserver, it will neither generate
timestamp files for not delete old builds.
Also, bugfix and extra documentation for local management of images in
build/images.
BUG=chromium:260474
TEST=manual
Start devserver without -x flag, and check that if there were previously
more than 5 builds in build/images, none are deleted by xBuddy, and
newly generated ones are not logged by xBuddy timestamps.
Start devserver with the flag. Images should be logged and deleted as
neccessary.
Change-Id: Id1a678eea703be61dc7d5771d26ddd9245dabb39
Reviewed-on: https://gerrit.chromium.org/gerrit/62236
Commit-Queue: Joy Chen <joychen@chromium.org>
Reviewed-by: Joy Chen <joychen@chromium.org>
Tested-by: Joy Chen <joychen@chromium.org>
diff --git a/xbuddy_unittest.py b/xbuddy_unittest.py
index 38eae34..ad90878 100644
--- a/xbuddy_unittest.py
+++ b/xbuddy_unittest.py
@@ -26,6 +26,7 @@
self.root_dir = tempfile.mkdtemp('xbuddy_unittest_ds_root')
self.mock_xb = xbuddy.XBuddy(
+ True,
root_dir=self.root_dir,
static_dir=self.static_image_dir
)