Esempio n. 1
0
def VersionConfig(name, is_buildbot):
    version_pattern = re.match(VERSION_BUILDER, name)
    if not version_pattern:
        return None
    # We don't really use this, but we create it anyway to use the standard
    # bot execution model.
    return bot.BuildInfo('none', 'none', 'release', 'linux')
Esempio n. 2
0
def PackagesConfig(name, is_buildbot):
    packages_pattern = re.match(PACKAGES_BUILDER, name)
    if not packages_pattern:
        return None
    system = packages_pattern.group(1)

    return bot.BuildInfo('none', 'vm', 'release', system, checked=True)
Esempio n. 3
0
def PubSteps(build_info):
    with bot.BuildStep('Build package-root'):
        args = [
            sys.executable, './tools/build.py', '--mode=' + build_info.mode,
            'packages'
        ]
        print 'Building package-root: %s' % (' '.join(args))
        bot.RunProcess(args)

    common_args = ['--write-test-outcome-log']
    if build_info.builder_tag:
        common_args.append('--builder-tag=%s' % build_info.builder_tag)

    # Pub tests currently have a lot of timeouts when run in debug mode.
    # See issue 18479
    if build_info.mode == 'release':
        bot.RunTest('pub', build_info, common_args + ['pub', 'pkg', 'docs'])
    else:
        bot.RunTest('pub', build_info, common_args + ['pkg', 'docs'])

    if build_info.mode == 'release':
        pkgbuild_build_info = bot.BuildInfo('none',
                                            'vm',
                                            build_info.mode,
                                            build_info.system,
                                            checked=False)
        bot.RunTest(
            'pkgbuild_repo_pkgs', pkgbuild_build_info, common_args +
            ['--append_logs', '--use-repository-packages', 'pkgbuild'])
        bot.RunTest(
            'pkgbuild_public_pkgs', pkgbuild_build_info, common_args +
            ['--append_logs', '--use-public-packages', 'pkgbuild'])
Esempio n. 4
0
def Config(name, is_buildbot):
    match = re.match(FLETCH_REGEXP, name)
    if not match:
        print('Builder regexp did not match')
        exit(1)
    # We don't really need this, but it is just much easier than doing all the
    # boilerplate outselves
    return bot.BuildInfo('none', 'none', 'release', match.group(1))
Esempio n. 5
0
def BuildConfig(name, is_buildbot):
  """Returns info for the current buildbot."""
  pattern = re.match(PATCHED_BUILDER, name)
  if pattern:
    system = pattern.group(1)
    arch = pattern.group(2)
    if system == 'mac': system = 'macos'
    return bot.BuildInfo('none', 'none', 'release', system, arch=arch)
  return None
Esempio n. 6
0
def PubSteps(build_info):
    with bot.BuildStep('Build package-root'):
        args = [
            sys.executable, './tools/build.py', '--mode=' + build_info.mode,
            'packages'
        ]
        print 'Building package-root: %s' % (' '.join(args))
        bot.RunProcess(args)

    common_args = ['--write-test-outcome-log']
    if build_info.builder_tag:
        common_args.append('--builder-tag=%s' % build_info.builder_tag)

    opt_threshold = '--vm-options=--optimization-counter-threshold=5'
    if build_info.mode == 'release':
        bot.RunTest('pub and pkg ',
                    build_info,
                    common_args + ['pub', 'pkg', 'docs'],
                    swallow_error=True)
        bot.RunTest('pub and pkg optimization counter thresshold 5',
                    build_info,
                    common_args +
                    ['--append_logs', opt_threshold, 'pub', 'pkg', 'docs'],
                    swallow_error=True)
    else:
        # Pub tests currently have a lot of timeouts when run in debug mode.
        # See issue 18479
        bot.RunTest('pub and pkg',
                    build_info,
                    common_args + ['pkg', 'docs'],
                    swallow_error=True)
        bot.RunTest('pub and pkg optimization counter threshold 5',
                    build_info,
                    common_args +
                    ['--append_logs', opt_threshold, 'pkg', 'docs'],
                    swallow_error=True)

    if build_info.mode == 'release':
        pkgbuild_build_info = bot.BuildInfo('none',
                                            'vm',
                                            build_info.mode,
                                            build_info.system,
                                            checked=False)
        bot.RunTest('pkgbuild_repo_pkgs',
                    pkgbuild_build_info,
                    common_args +
                    ['--append_logs', '--use-repository-packages', 'pkgbuild'],
                    swallow_error=True)

        # We are seeing issues with pub get calls on the windows bots.
        # Experiment with not running concurrent calls.
        public_args = (common_args +
                       ['--append_logs', '--use-public-packages', 'pkgbuild'])
        if build_info.system == 'windows':
            public_args.append('-j1')
        bot.RunTest('pkgbuild_public_pkgs', pkgbuild_build_info, public_args)
Esempio n. 7
0
def SrcConfig(name, is_buildbot):
    """Returns info for the current buildbot based on the name of the builder.

  Currently, since we only run this on linux, this is just:
  - mode: always "release"
  - system: always "linux"
  """
    src_pattern = re.match(SRC_BUILDER, name)
    if not src_pattern:
        return None
    return bot.BuildInfo('none', 'none', 'release', 'linux')
Esempio n. 8
0
def PubSteps(build_info):
    with bot.BuildStep('Build package-root'):
        args = [
            sys.executable, './tools/build.py', '--mode=' + build_info.mode,
            'packages'
        ]
        print 'Building package-root: %s' % (' '.join(args))
        bot.RunProcess(args)

    common_args = ['--write-test-outcome-log']
    if build_info.builder_tag:
        common_args.append('--builder-tag=%s' % build_info.builder_tag)

    # There are a number of big/integration tests in pkg, run with bigger timeout
    common_args.append('--timeout=120')
    # We have some unreproducible vm crashes on these bots
    common_args.append('--copy-coredumps')

    if build_info.system == 'windows':
        common_args.append('-j1')
    if build_info.mode == 'release':
        bot.RunTest('pub and pkg ',
                    build_info,
                    common_args + ['pub', 'pkg', 'docs'],
                    swallow_error=True)
    else:
        # Pub tests currently have a lot of timeouts when run in debug mode.
        # See issue 18479
        bot.RunTest('pub and pkg',
                    build_info,
                    common_args + ['pkg', 'docs'],
                    swallow_error=True)

    if build_info.mode == 'release':
        pkgbuild_build_info = bot.BuildInfo('none',
                                            'vm',
                                            build_info.mode,
                                            build_info.system,
                                            checked=False)
        bot.RunTest('pkgbuild_repo_pkgs',
                    pkgbuild_build_info,
                    common_args +
                    ['--append_logs', '--use-repository-packages', 'pkgbuild'],
                    swallow_error=True)

        # We are seeing issues with pub get calls on the windows bots.
        # Experiment with not running concurrent calls.
        public_args = (common_args +
                       ['--append_logs', '--use-public-packages', 'pkgbuild'])
        bot.RunTest('pkgbuild_public_pkgs', pkgbuild_build_info, public_args)
Esempio n. 9
0
def PubConfig(name, is_buildbot):
    """Returns info for the current buildbot based on the name of the builder.

  Currently, this is just:
  - mode: always "release"
  - system: "linux", "mac", or "win"
  """
    pub_pattern = re.match(PUB_BUILDER, name)
    if not pub_pattern:
        return None

    system = pub_pattern.group(1)
    if system == 'win': system = 'windows'

    return bot.BuildInfo('none', 'vm', 'release', system, checked=True)
Esempio n. 10
0
def PkgConfig(name, is_buildbot):
  """Returns info for the current buildbot based on the name of the builder.

  Currently, this is just:
  - system: "linux", "mac", or "win"
  """
  pkg_pattern = re.match(PKG_BUILDER, name)
  if not pkg_pattern:
    return None

  system = pkg_pattern.group(1)
  locale = pkg_pattern.group(3)
  if system == 'win': system = 'windows'

  return bot.BuildInfo('none', 'vm', 'release', system, checked=True,
                       builder_tag=locale)
Esempio n. 11
0
def SrcConfig(name, is_buildbot):
    """Returns info for the current buildbot based on the name of the builder.

  - mode: always "release"
  - system: always "linux" or "mac"
  """
    pattern = re.match(FT_BUILDER, name)
    master_pattern = re.match(FT_MASTER, name)
    if not pattern and not master_pattern:
        return None
    if master_pattern:
        tag = 'master'
        system = 'linux'
    else:
        tag = 'slave'
        system = pattern.group(1)
    return bot.BuildInfo('none', 'none', 'release', system, builder_tag=tag)
Esempio n. 12
0
def PkgSteps(build_info):
    common_args = ['--write-test-outcome-log']
    if build_info.builder_tag:
        common_args.append('--builder-tag=%s' % build_info.builder_tag)

    # There are a number of big/integration tests in pkg, run with bigger timeout
    timeout = 300 if build_info.mode == 'debug' else 120
    common_args.append('--timeout=%s' % timeout)
    # We have some unreproducible vm crashes on these bots
    common_args.append('--copy-coredumps')

    # We are seeing issues with pub get calls on the windows bots.
    # Experiment with not running concurrent calls.
    if build_info.system == 'windows':
        common_args.append('-j1')

    bot.RunTest('pkg',
                build_info,
                common_args + ['pkg', 'docs'],
                swallow_error=True)

    # Pkg tests currently have a lot of timeouts when run in debug mode.
    # See issue 18479
    if build_info.mode != 'release': return

    with bot.BuildStep('third_party pkg tests', swallow_error=True):
        pkg_tested = os.path.join('third_party', 'pkg_tested')
        for entry in os.listdir(pkg_tested):
            path = os.path.join(pkg_tested, entry)
            if os.path.isdir(path): bot.RunTestRunner(build_info, path)

    pkgbuild_build_info = bot.BuildInfo('none',
                                        'vm',
                                        build_info.mode,
                                        build_info.system,
                                        checked=False)
    bot.RunTest('pkgbuild_repo_pkgs',
                pkgbuild_build_info,
                common_args +
                ['--append_logs', '--use-repository-packages', 'pkgbuild'],
                swallow_error=True)

    public_args = (common_args +
                   ['--append_logs', '--use-public-packages', 'pkgbuild'])
    bot.RunTest('pkgbuild_public_pkgs', pkgbuild_build_info, public_args)
Esempio n. 13
0
def GetBuildInfo(builder_name, is_buildbot):
  """Returns a BuildInfo object for the current buildbot based on the
     name of the builder.
  """
  compiler = None
  runtime = None
  mode = None
  system = None
  checked = False
  host_checked = False
  minified = False
  shard_index = None
  total_shards = None
  test_set = None
  csp = None
  arch = None
  dart2js_full = False

  dart2js_pattern = re.match(DART2JS_BUILDER, builder_name)
  dart2js_full_pattern = re.match(DART2JS_FULL_BUILDER, builder_name)
  web_pattern = re.match(WEB_BUILDER, builder_name)
  dartium_pattern = re.match(DARTIUM_BUILDER, builder_name)

  if web_pattern:
    compiler = 'dart2js'
    runtime = web_pattern.group(1)
    system = web_pattern.group(2)
    mode = 'release'
    test_set = web_pattern.group(4)
    if web_pattern.group(6) == 'csp':
      csp = True
    shard_index = web_pattern.group(8)
    total_shards = web_pattern.group(9)
  elif dart2js_full_pattern:
    mode = 'release'
    compiler = 'dart2js'
    dart2js_full = True
    system = dart2js_full_pattern.group(1)
    if dart2js_full_pattern.group(2):
      checked = True
    if dart2js_full_pattern.group(3):
      minified = True
    shard_index = dart2js_full_pattern.group(4)
    total_shards = dart2js_full_pattern.group(5)
  elif dart2js_pattern:
    compiler = 'dart2js'
    system = dart2js_pattern.group(1)
    runtime = 'd8'
    arch = 'ia32'
    if dart2js_pattern.group(3) == 'jsshell':
      runtime = 'jsshell'
    mode = dart2js_pattern.group(4)
    # The valid naming parts for checked and host-checked are:
    # Empty: checked=False, host_checked=False
    # -checked: checked=True, host_checked=False
    # -host-checked: checked=False, host_checked=True
    # -checked-host-checked: checked=True, host_checked=True
    if dart2js_pattern.group(6) == 'checked':
      checked = True
    if dart2js_pattern.group(6) == 'host-checked':
      host_checked = True
    if dart2js_pattern.group(8) == 'host-checked':
      host_checked = True
    if dart2js_pattern.group(10) == 'minified':
      minified = True
    if dart2js_pattern.group(12) == 'x64':
      arch = 'x64'
    shard_index = dart2js_pattern.group(13)
    total_shards = dart2js_pattern.group(14)
  elif dartium_pattern:
    compiler = 'none'
    runtime = 'dartium'
    mode = 'release'
    system = dartium_pattern.group(1)
  else :
    return None

  # We have both win7 and win8 bots, functionality is the same.
  if system.startswith('win'):
    system = 'windows'

  # We have both 10.8 and 10.7 bots, functionality is the same.
  if system == 'mac10.8' or system == 'mac10.7':
    system = 'mac'

  if (system == 'windows' and platform.system() != 'Windows') or (
      system == 'mac' and platform.system() != 'Darwin') or (
      system == 'linux' and platform.system() != 'Linux'):
    print ('Error: You cannot emulate a buildbot with a platform different '
        'from your own.')
    return None
  return bot.BuildInfo(compiler, runtime, mode, system, checked, host_checked,
                       minified, shard_index, total_shards, is_buildbot,
                       test_set, csp, arch, dart2js_full)
Esempio n. 14
0
def GetBuildInfo(builder_name, is_buildbot):
    """Returns a BuildInfo object for the current buildbot based on the
     name of the builder.
  """
    compiler = None
    runtime = None
    mode = None
    system = None
    checked = False
    host_checked = False
    minified = False
    shard_index = None
    total_shards = None
    test_set = None
    csp = None
    arch = None
    dart2js_full = False
    batch = True
    builder_tag = None

    dart2js_pattern = re.match(DART2JS_BUILDER, builder_name)
    dart2js_full_pattern = re.match(DART2JS_FULL_BUILDER, builder_name)
    web_pattern = re.match(WEB_BUILDER, builder_name)
    dartium_pattern = re.match(DARTIUM_BUILDER, builder_name)

    if web_pattern:
        compiler = 'dart2js'
        runtime = web_pattern.group(1)
        system = web_pattern.group(2)
        mode = 'release'
        test_set = web_pattern.group(4)
        if web_pattern.group(6) == 'csp':
            csp = True
        shard_index = web_pattern.group(8)
        total_shards = web_pattern.group(9)
    elif dart2js_full_pattern:
        mode = 'release'
        compiler = 'dart2js'
        dart2js_full = True
        system = dart2js_full_pattern.group(1)
        # windows-ie10 or windows-ie11 means a windows machine with that respective
        # version of ie installed. There is no difference in how we handle testing.
        # We use the builder tag to pass along this information.
        if system.startswith('win'):
            ie = dart2js_full_pattern.group(3)
            assert ie in IE_VERSIONS
            builder_tag = 'windows-%s' % ie
            system = 'windows'
        if dart2js_full_pattern.group(4):
            checked = True
        if dart2js_full_pattern.group(5):
            minified = True
        shard_index = dart2js_full_pattern.group(6)
        total_shards = dart2js_full_pattern.group(7)
    elif dart2js_pattern:
        compiler = 'dart2js'
        system = dart2js_pattern.group(1)
        runtime = 'd8'
        arch = 'ia32'
        if dart2js_pattern.group(3) == 'jsshell':
            runtime = 'jsshell'
        mode = dart2js_pattern.group(4)
        # The valid naming parts for checked and host-checked are:
        # Empty: checked=False, host_checked=False
        # -checked: checked=True, host_checked=False
        # -host-checked: checked=False, host_checked=True
        # -checked-host-checked: checked=True, host_checked=True
        if dart2js_pattern.group(6) == 'checked':
            checked = True
        if dart2js_pattern.group(6) == 'host-checked':
            host_checked = True
        if dart2js_pattern.group(8) == 'host-checked':
            host_checked = True
        if dart2js_pattern.group(10) == 'minified':
            minified = True
        if dart2js_pattern.group(12) == 'x64':
            arch = 'x64'
        shard_index = dart2js_pattern.group(13)
        total_shards = dart2js_pattern.group(14)
    elif dartium_pattern:
        compiler = 'none'
        runtime = 'dartium'
        mode = 'release'
        system = dartium_pattern.group(1)
    else:
        return None

    # We have both win7 and win8 bots, functionality is the same.
    if system.startswith('win'):
        system = 'windows'

    # We have both 10.8 and 10.7 bots, functionality is the same.
    if system == 'mac10.7' or system == 'mac10.8' or system == 'mac10.9':
        builder_tag = system.replace('.', '_')
        system = 'mac'

    if (system == 'windows' and platform.system() != 'Windows') or (
            system == 'mac' and platform.system() != 'Darwin') or (
                system == 'linux' and platform.system() != 'Linux'):
        print(
            'Error: You cannot emulate a buildbot with a platform different '
            'from your own.')
        return None
    return bot.BuildInfo(compiler,
                         runtime,
                         mode,
                         system,
                         checked,
                         host_checked,
                         minified,
                         shard_index,
                         total_shards,
                         is_buildbot,
                         test_set,
                         csp,
                         arch,
                         dart2js_full,
                         batch=batch,
                         builder_tag=builder_tag)
def ServicesConfig(name, is_buildbot):
    """Returns info for the current buildbot.
  We only run this bot on linux, so all of this is just hard coded.
  """
    return bot.BuildInfo('none', 'none', 'release', 'linux')
Esempio n. 16
0
TARGETS = ['language_2', 'corelib_2', 'lib_2']

FLAGS = ['--strong']

if __name__ == '__main__':
    with bot.BuildStep('Build SDK and dartdevc test packages'):
        bot.RunProcess([
            sys.executable, './tools/build.py', '--mode=release', '--arch=x64',
            'dartdevc_test'
        ])

    with bot.BuildStep('Run tests'):
        (bot_name, _) = bot.GetBotName()
        system = bot_utils.GetSystemFromName(bot_name)
        if system == 'linux':
            bot.RunProcess([
                'xvfb-run', sys.executable, './tools/test.py', '--strong',
                '-mrelease', '-cdartdevc', '-rchrome', '-ax64', '--report',
                '--time', '--checked', '--progress=buildbot',
                '--write-result-log'
            ] + TARGETS)
        else:
            info = bot.BuildInfo(
                'dartdevc',
                'chrome',
                'release',
                system,
                arch='x64',
                checked=True)
            bot.RunTest('dartdevc', info, TARGETS, flags=FLAGS)