roll_deps.py: Make default_bots_list a module-level variable
This allows us to import the script rather than run it in a sub-shell.
BUG=skia:
R=halcanary@google.com
Review URL: https://codereview.chromium.org/140973003
git-svn-id: http://skia.googlecode.com/svn/trunk@13200 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tools/roll_deps.py b/tools/roll_deps.py
index b34baac..3767df4 100755
--- a/tools/roll_deps.py
+++ b/tools/roll_deps.py
@@ -30,6 +30,30 @@
import tempfile
+DEFAULT_BOTS_LIST = [
+ 'android_clang_dbg',
+ 'android_dbg',
+ 'android_rel',
+ 'cros_daisy',
+ 'linux',
+ 'linux_asan',
+ 'linux_chromeos',
+ 'linux_chromeos_asan',
+ 'linux_gpu',
+ 'linux_layout',
+ 'linux_layout_rel',
+ 'mac',
+ 'mac_asan',
+ 'mac_gpu',
+ 'mac_layout',
+ 'mac_layout_rel',
+ 'win',
+ 'win_gpu',
+ 'win_layout',
+ 'win_layout_rel',
+]
+
+
class DepsRollConfig(object):
"""Contains configuration options for this module.
@@ -84,29 +108,6 @@
Called by the main() function.
"""
- default_bots_list = [
- 'android_clang_dbg',
- 'android_dbg',
- 'android_rel',
- 'cros_daisy',
- 'linux',
- 'linux_asan',
- 'linux_chromeos',
- 'linux_chromeos_asan',
- 'linux_gpu',
- 'linux_layout',
- 'linux_layout_rel',
- 'mac',
- 'mac_asan',
- 'mac_gpu',
- 'mac_layout',
- 'mac_layout_rel',
- 'win',
- 'win_gpu',
- 'win_layout',
- 'win_layout_rel',
- ]
-
option_parser = optparse.OptionParser(usage=__doc__)
# Anyone using this script on a regular basis should set the
# CHROMIUM_CHECKOUT_PATH environment variable.
@@ -150,8 +151,8 @@
default_bots_help = (
'Comma-separated list of bots, defaults to a list of %d bots.'
' To skip `git cl try`, set this to an empty string.'
- % len(default_bots_list))
- default_bots = ','.join(default_bots_list)
+ % len(DEFAULT_BOTS_LIST))
+ default_bots = ','.join(DEFAULT_BOTS_LIST)
option_parser.add_option(
'', '--bots', help=default_bots_help, default=default_bots)