Add a bunch of integration tests for xbuddy and autotest workflows.
This CL starts the process of adding integration testing to both the
xbuddy and lab workflows. Anyone making substantial changes to the
devserver will be required to run all of these tests (including adding
more if adding new functionality).
This CL adds testing of the following RPCs:
stage
is_staged
update
xbuddy
This CL also removes the hardcoding of 8080 and tries all ports from
8080-8090.
BUG=chromium:216959
TEST=Ran them.
Change-Id: I7a547698963e2c114c480977058059ca5d9de3ba
Reviewed-on: https://chromium-review.googlesource.com/173162
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
diff --git a/devserver.py b/devserver.py
index be8352d..1971ee6 100755
--- a/devserver.py
+++ b/devserver.py
@@ -61,6 +61,7 @@
import build_artifact
import common_util
import downloader
+import gsutil_util
import log_util
import xbuddy
@@ -187,6 +188,8 @@
}
if options.production:
base_config['global'].update({'server.thread_pool': 150})
+ # TODO(sosa): Do this more cleanly.
+ gsutil_util.GSUTIL_ATTEMPTS = 5
return base_config
@@ -1050,8 +1053,6 @@
cherrypy.log.error_log.addHandler(hdlr)
# pylint: enable=E1101
- root_dir = os.path.realpath('%s/../..' % devserver_dir)
-
# set static_dir, from which everything will be served
options.static_dir = os.path.realpath(options.static_dir)
@@ -1065,12 +1066,10 @@
os.makedirs(cache_dir)
_Log('Using cache directory %s' % cache_dir)
- _Log('Source root is %s' % root_dir)
_Log('Serving from %s' % options.static_dir)
_xbuddy = xbuddy.XBuddy(options.xbuddy_manage_builds,
options.board,
- root_dir=root_dir,
static_dir=options.static_dir)
if options.clear_cache and options.xbuddy_manage_builds:
_xbuddy.CleanCache()
@@ -1080,7 +1079,6 @@
global updater
updater = autoupdate.Autoupdate(
_xbuddy,
- root_dir=root_dir,
static_dir=options.static_dir,
urlbase=options.urlbase,
forced_image=options.image,