| Index: client/tools/buildbot_annotated_steps.py
|
| diff --git a/client/tools/buildbot_annotated_steps.py b/client/tools/buildbot_annotated_steps.py
|
| index 845c8fe7d933d016e9ca9202b29b338e6ebd75bd..9c2748812473b0a086a08a8283f8b95e2faa07a9 100644
|
| --- a/client/tools/buildbot_annotated_steps.py
|
| +++ b/client/tools/buildbot_annotated_steps.py
|
| @@ -30,35 +30,18 @@ DARTIUM_VERSION_FILE = 'client/tests/drt/LAST_VERSION'
|
| DARTIUM_V_MATCHER = (
|
| 'gs://dartium-archive/[^/]*/dartium-\w*-inc-([0-9]*).([0-9]*).zip')
|
|
|
| -# Patterns are of the form "dart_client-linux-ia32-debug"
|
| -BUILDER_PATTERN = r'dart_client-(\w+)-(\w+)-(\w+)'
|
| -
|
| -
|
| def GetBuildInfo():
|
| - """Returns a tuple (name, version, arch, mode, platform) where:
|
| + """Returns a tuple (name, version, mode) where:
|
| - name: A name for the build - the buildbot host if a buildbot.
|
| - version: A version string corresponding to this build.
|
| - - component: 'dartium' (default) or 'chromium'
|
| - - mode: 'debug' or 'release' (default)
|
| - - platform: 'linux' or 'mac'
|
| """
|
| name = None
|
| version = None
|
| - mode = 'release'
|
| - component = 'dartium'
|
| - platform = 'linux'
|
|
|
| # Populate via builder environment variables.
|
| name = os.environ.get(BUILDER_NAME)
|
| version = os.environ.get(REVISION)
|
|
|
| - if name:
|
| - pattern = re.match(BUILDER_PATTERN, name)
|
| - if pattern:
|
| - platform = pattern.group(1)
|
| - component = pattern.group(2)
|
| - mode = pattern.group(3)
|
| -
|
| # Fall back if not on builder.
|
| if not name:
|
| name = socket.gethostname().split('.')[0]
|
| @@ -73,24 +56,8 @@ def GetBuildInfo():
|
| version = output[0]
|
| else:
|
| version = 'unknown'
|
| - return (name, version, component, mode, platform)
|
| -
|
| + return (name, version)
|
|
|
| -def RunDartcCompiler(mode, outdir):
|
| - """Compiles the client code to javascript for dartc tests."""
|
| - return subprocess.call(
|
| - [sys.executable, './tools/build.py', '--mode=' + mode, 'compiler'])
|
| -
|
| -def RunBrowserTests(component, mode, platform):
|
| - """Runs the Dart client tests."""
|
| - if platform == 'linux':
|
| - cmd = ['xvfb-run']
|
| - else:
|
| - cmd = []
|
| - cmd += [sys.executable, './tools/test_wrapper.py',
|
| - '--component=' + component, '--mode=' + mode,
|
| - '--time', '--report', '--progress=buildbot', '-v']
|
| - return subprocess.call(cmd)
|
|
|
| def GetUtils():
|
| '''
|
| @@ -115,35 +82,6 @@ def GetOutDir(utils, mode):
|
| '''
|
| return utils.GetBuildRoot(utils.GuessOS(), mode, utils.ARCH_GUESS)
|
|
|
| -def ProcessDartClientTests(component, mode, platform, name):
|
| - '''
|
| - build and test the dart client applications
|
| -
|
| - args:
|
| - component - the component we are testing against
|
| - mode - the mode release or debug
|
| - platform - the platform we are building for
|
| - '''
|
| - print 'ProcessDartClientTests'
|
| - if component == 'chromium':
|
| - print ('@@@BUILD_STEP dartc dart clients: %s@@@' % name)
|
| -
|
| - utils = GetUtils()
|
| - outdir = GetOutDir(utils, mode)
|
| - status = RunDartcCompiler(mode, outdir)
|
| - if status != 0:
|
| - return status
|
| -
|
| - if component == 'dartium':
|
| - if os.path.exists(DARTIUM_VERSION_FILE):
|
| - latest = open(DARTIUM_VERSION_FILE, 'r').read()
|
| - match = re.match(DARTIUM_V_MATCHER, latest)
|
| - if match:
|
| - print '@@@BUILD_STEP vm r%s (dartium r%s)@@@' % (
|
| - match.group(2), match.group(1))
|
| - print '@@@BUILD_STEP browser unit tests@@@'
|
| - return RunBrowserTests(component, mode, platform)
|
| -
|
| def ProcessTools(mode, name, version):
|
| '''
|
| build and test the tools
|
| @@ -184,12 +122,12 @@ def ProcessFrog(name):
|
| print 'ProcessFrog'
|
| has_shell=False
|
| if 'windows' in name:
|
| - os.environ['PATH'] = (os.path.join('C:', 'Program Files (x86)', 'nodejs') +
|
| + os.environ['PATH'] = (os.path.join('C:', 'Program Files (x86)', 'nodejs') +
|
| os.pathsep + os.environ['PATH'])
|
| # In Windows we need to run in the shell, so that we have all the
|
| # environment variables available.
|
| has_shell=True
|
| - return subprocess.call([sys.executable,
|
| + return subprocess.call([sys.executable,
|
| os.path.join('frog', 'scripts', 'buildbot_annotated_steps.py')],
|
| env=os.environ, shell=has_shell)
|
|
|
| @@ -203,14 +141,12 @@ def main():
|
| # Get at the top-level directory. This script is in client/tools
|
| os.chdir(os.path.abspath(os.path.join(scriptdir, os.pardir, os.pardir)))
|
|
|
| - (name, version, component, mode, platform) = GetBuildInfo()
|
| - if name.startswith('dart-editor'):
|
| - status = ProcessTools(mode, name, version)
|
| #TODO(sigmund): remove this indirection once we update our bots
|
| - elif name.startswith('frog'):
|
| - status = ProcessFrog(name)
|
| + (name, version) = GetBuildInfo()
|
| + if name.startswith('dart-editor'):
|
| + status = ProcessTools('release', name, version)
|
| else:
|
| - status = ProcessDartClientTests(component, mode, platform, name)
|
| + status = ProcessFrog(name)
|
|
|
| if status:
|
| print '@@@STEP_FAILURE@@@'
|
|
|