Ejemplo n.º 1
0
def main():
    build_py = os.path.join('tools', 'build.py')
    architectures = ['ia32', 'x64']
    test_architectures = ['x64']
    if sys.platform == 'win32':
        # Our windows bots pull in only a 32 bit JVM.
        test_architectures = ['ia32']

    for arch in architectures:
        with bot.BuildStep('Build Editor %s' % arch):
            args = [
                sys.executable, build_py, '-mrelease',
                '--arch=%s' % arch, 'editor'
            ]
            print 'Running: %s' % (' '.join(args))
            sys.stdout.flush()
            bot.RunProcess(args)

    for arch in test_architectures:
        editor_executable = GetEditorExecutable('Release', arch)
        with bot.BuildStep('Test Editor %s' % arch):
            with TempDir() as temp_dir:
                args = [
                    editor_executable, '--test', '--auto-exit', '-data',
                    temp_dir
                ]
                print 'Running: %s' % (' '.join(args))
                sys.stdout.flush()
                bot.RunProcess(args)
    return 0
Ejemplo n.º 2
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'])
Ejemplo n.º 3
0
def PubSteps(build_info):
    with bot.BuildStep('Build API Docs'):
        args = [
            sys.executable, './tools/build.py', '--mode=' + build_info.mode,
            'api_docs'
        ]
        print 'Generating API Docs: %s' % (' '.join(args))
        bot.RunProcess(args)

    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)

    bot.RunTest('pub', build_info, ['pub', 'pkg', 'dartdoc', 'docs'])
Ejemplo n.º 4
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)
Ejemplo n.º 5
0
def BuildCompiler(build_info):
  """
  Builds the SDK.

  - build_info: the buildInfo object, containing information about what sort of
      build and test to be run.
  """
  with bot.BuildStep('Build SDK'):
    args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode,
            '--arch=' + build_info.arch, 'dart2js_bot']
    print 'Build SDK and d8: %s' % (' '.join(args))
    bot.RunProcess(args)
Ejemplo n.º 6
0
def TestStep(name, mode, system, compiler, runtime, targets, flags):
    step_name = TestStepName(name, flags)
    with bot.BuildStep(step_name, swallow_error=True):
        sys.stdout.flush()
        if NeedsXterm(compiler, runtime) and system == 'linux':
            cmd = ['xvfb-run', '-a']
        else:
            cmd = []

        user_test = os.environ.get('USER_TEST', 'no')

        # TODO(ricow): temporary hack to run on fyi with --use_browser_controller
        if os.environ.get(
                'BUILDBOT_SCHEDULER') == "fyi-main" and runtime == 'drt':
            runtime = 'chrome'

        cmd.extend([
            sys.executable,
            os.path.join(os.curdir, 'tools',
                         'test.py'), '--step_name=' + step_name,
            '--mode=' + mode, '--compiler=' + compiler, '--runtime=' + runtime,
            '--time', '--use-sdk', '--report', '--write-debug-log'
        ])

        # TODO(ricow/kustermann): Issue 7339
        if runtime == "safari":
            cmd.append('--nobatch')

        if user_test == 'yes':
            cmd.append('--progress=color')
        else:
            cmd.extend(['--progress=buildbot', '-v'])

        # TODO(ricow): temporary hack to run on fyi with --use_browser_controller
        if (os.environ.get('BUILDBOT_SCHEDULER') == "fyi-main"
                and (runtime == 'chrome' or runtime == 'ff')):
            cmd.append('--use_browser_controller')

        global IsFirstTestStepCall
        if IsFirstTestStepCall:
            IsFirstTestStepCall = False
        else:
            cmd.append('--append_logs')

        if flags:
            cmd.extend(flags)
        cmd.extend(targets)

        print 'Running: %s' % (' '.join(map(lambda arg: '"%s"' % arg, cmd)))
        bot.RunProcess(cmd)
Ejemplo n.º 7
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)
Ejemplo n.º 8
0
def BuildCompiler(build_info):
  """
  Builds the SDK.

  - build_info: the buildInfo object, containing information about what sort of
      build and test to be run.
  """
  with bot.BuildStep('Build SDK'):
    target = 'dart2js_bot'
    # Try-dart takes more than 20 min in debug mode and makes the bot time out.
    # We use the debug target which does not include try
    if build_info.mode == 'debug':
      target = 'dart2js_bot_debug'
    args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode,
            '--arch=' + build_info.arch, target]
    print 'Build SDK and d8: %s' % (' '.join(args))
    bot.RunProcess(args)
Ejemplo n.º 9
0
def BuildAndroid(build_info):
  """
  Builds the android target.

  - build_info: the buildInfo object, containing information about what sort of
      build and test to be run.
  """
  with bot.BuildStep('Build Android'):
    # TODO(vsm): A temporary hack until we figure out why incremental builds are
    # broken on Android.
    if os.path.exists('./out/lastHooksTargetOS.txt'):
      os.remove('./out/lastHooksTargetOS.txt')
    targets = ['samples']
    args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode,
            '--os=android'] + targets
    print 'Building Android: %s' % (' '.join(args))
    bot.RunProcess(args)
Ejemplo n.º 10
0
def TestStep(name, mode, system, compiler, runtime, targets, flags, arch):
  step_name = TestStepName(name, flags)
  with bot.BuildStep(step_name, swallow_error=True):
    sys.stdout.flush()
    if NeedsXterm(compiler, runtime) and system == 'linux':
      cmd = ['xvfb-run', '-a']
    else:
      cmd = []

    user_test = os.environ.get('USER_TEST', 'no')

    cmd.extend([sys.executable,
                os.path.join(os.curdir, 'tools', 'test.py'),
                '--step_name=' + step_name,
                '--mode=' + mode,
                '--compiler=' + compiler,
                '--runtime=' + runtime,
                '--arch=' + arch,
                '--time',
                '--use-sdk',
                '--report',
                '--write-debug-log',
                '--write-test-outcome-log'])

    if user_test == 'yes':
      cmd.append('--progress=color')
    else:
      cmd.extend(['--progress=buildbot', '-v'])

    if runtime == 'safari':
      cmd.append('--clear_safari_cache')

    global IsFirstTestStepCall
    if IsFirstTestStepCall:
      IsFirstTestStepCall = False
    else:
      cmd.append('--append_logs')

    if flags:
      cmd.extend(flags)
    cmd.extend(targets)

    print 'Running: %s' % (' '.join(map(lambda arg: '"%s"' % arg, cmd)))
    sys.stdout.flush()
    bot.RunProcess(cmd)
Ejemplo n.º 11
0
def main():
    build_py = os.path.join('tools', 'build.py')

    architectures = ['ia32', 'x64']
    test_architectures = ['x64']
    if sys.platform == 'win32':
        # Our windows bots pull in only a 32 bit JVM.
        test_architectures = ['ia32']

    for arch in architectures:
        with bot.BuildStep('Build Editor %s' % arch):
            args = [
                sys.executable, build_py, '-mrelease',
                '--arch=%s' % arch, 'editor', 'create_sdk'
            ]
            RunProcess(args)

    # before we run the editor, suppress any 'restore windows' dialogs
    if sys.platform == 'darwin':
        bot.RunProcess([
            'defaults', 'write', 'org.eclipse.eclipse.savedState',
            'NSQuitAlwaysKeepsWindows', '-bool', 'false'
        ])

    for arch in test_architectures:
        editor_executable = GetEditorExecutable('Release', arch)
        with bot.BuildStep('Test Editor %s' % arch):
            with utils.TempDir('eclipse') as temp_dir:
                args = [
                    editor_executable, '--test', '--auto-exit', '-data',
                    temp_dir
                ]
                RunProcess(args)

    # TODO: Permissions need to be clarified
    for arch in test_architectures:
        with bot.BuildStep('Build Installer %s' % arch):
            if sys.platform == 'darwin':
                CreateAndUploadMacInstaller(arch)
            else:
                print(
                    "We currently don't build installers for sys.platform=%s" %
                    sys.platform)
    return 0
Ejemplo n.º 12
0
import os.path
import shutil
import sys
import subprocess

import bot
import bot_utils

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',
Ejemplo n.º 13
0
import os
import os.path
import shutil
import sys
import subprocess

import bot
import bot_utils

TARGETS = ['language_strong', 'corelib_strong', 'lib_strong']

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)
        info = bot.BuildInfo('dartdevc',
                             'drt',
                             'release',
                             system,
                             arch='x64',
                             checked=True)
        bot.RunTest('dartdevc', info, TARGETS, flags=FLAGS)
Ejemplo n.º 14
0
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.

import os
import os.path
import shutil
import sys
import subprocess

import bot
import bot_utils

utils = bot_utils.GetUtils()

BUILD_OS = utils.GuessOS()

(bot_name, _) = bot.GetBotName()
CHANNEL = bot_utils.GetChannelFromName(bot_name)

if __name__ == '__main__':
    with utils.ChangedWorkingDirectory('pkg/dev_compiler'):
        with bot.BuildStep('npm install'):
            bot.RunProcess(['npm', 'install'])

        with bot.BuildStep('Compile tests and run unit tests'):
            bot.RunProcess(
                [utils.CheckedInSdkExecutable(), 'test/all_tests.dart'])

        with bot.BuildStep('Execute compiled tests'):
            bot.RunProcess(['npm', 'test'])
Ejemplo n.º 15
0
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.

import os
import os.path
import shutil
import sys
import subprocess

import bot
import bot_utils

utils = bot_utils.GetUtils()

BUILD_OS = utils.GuessOS()

(bot_name, _) = bot.GetBotName()
CHANNEL = bot_utils.GetChannelFromName(bot_name)

if __name__ == '__main__':
    with utils.ChangedWorkingDirectory('pkg/dev_compiler'):
        dart_exe = utils.CheckedInSdkExecutable()

        # These two calls mirror pkg/dev_compiler/tool/test.sh.
        bot.RunProcess([dart_exe, 'tool/build_pkgs.dart', 'test'])
        bot.RunProcess([dart_exe, 'test/all_tests.dart'])

        # These mirror pkg/dev_compiler/tool/browser_test.sh.
        bot.RunProcess(['npm', 'install'])
        bot.RunProcess(['npm', 'test'])
Ejemplo n.º 16
0
def Run(command):
    print "Running %s" % ' '.join(command)
    return bot.RunProcess(command)
Ejemplo n.º 17
0
def run(args):
    print 'Running: %s' % (' '.join(args))
    sys.stdout.flush()
    bot.RunProcess(args)
Ejemplo n.º 18
0
def Run(command, env=None):
    print "Running %s" % ' '.join(command)
    print "Environment %s" % env
    return bot.RunProcess(command, env=env)
Ejemplo n.º 19
0
def RunProcess(args):
    if sys.platform == 'linux2':
        args = ['xvfb-run', '-a'] + args
    print 'Running: %s' % (' '.join(args))
    sys.stdout.flush()
    bot.RunProcess(args)
Ejemplo n.º 20
0
def Run(args):
    print "Running: %s" % ' '.join(args)
    sys.stdout.flush()
    bot.RunProcess(args)
Ejemplo n.º 21
0
  'language_2',
  'corelib_2',
  'lib_2',
  # TODO(rnystrom): Remove these when all tests have been migrated out.
  'language_strong',
  'corelib_strong',
  'lib_strong'
]

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',
        'language_2', 'corelib_2', 'language_strong'])
    else:
      info = bot.BuildInfo('dartdevc', 'chrome', 'release', system,
          arch='x64', checked=True)
      bot.RunTest('dartdevc', info, TARGETS, flags=FLAGS)