コード例 #1
0
ファイル: cross-vm.py プロジェクト: yongaru/bleeding_edge
def cross_compiling_builder(arch, mode):
  build_py = os.path.join('tools', 'build.py')
  revision = int(os.environ['BUILDBOT_GOT_REVISION'])
  tarball = tarball_name(arch, mode, revision)
  temporary_files = [tarball]
  bot.Clobber()
  try:
    num_run = int(os.environ['BUILDBOT_ANNOTATED_STEPS_RUN'])
    if num_run == 1:
      with bot.BuildStep('Build %s %s' % (arch, mode)):
        run([sys.executable, build_py,
             '-m%s' % mode, '--arch=%s' % arch])

      with bot.BuildStep('Create build tarball'):
        run(['tar', '-cjf', tarball, '--exclude=**/obj',
             '--exclude=**/obj.host', '--exclude=**/obj.target',
             '--exclude=**/*analyzer*', 'out/'])

      with bot.BuildStep('Upload build tarball'):
        uri = "%s/%s" % (GCS_BUCKET, tarball)
        run([GSUTIL, 'cp', tarball, uri])
        run([GSUTIL, 'setacl', 'public-read', uri])

    elif num_run == 2:
      with bot.BuildStep('tests'):
        print "Please see the target device for results."
        print "We no longer record/replay tests."
    else:
      raise Exception("Invalid annotated steps run")
  finally:
    for path in temporary_files:
      if os.path.exists(path):
        os.remove(path)
コード例 #2
0
ファイル: fletch.py プロジェクト: aam/fletch
def StepsLK(debug_log):
    # We need the fletch daemon process to compile snapshots.
    host_configuration = GetBuildConfigurations(system=utils.GuessOS(),
                                                modes=['debug'],
                                                archs=['ia32'],
                                                asans=[False],
                                                embedded_libs=[False],
                                                use_sdks=[False])[0]

    # Generate ninja files.
    StepGyp()

    StepBuild(host_configuration['build_conf'],
              host_configuration['build_dir'])

    device_configuration = host_configuration.copy()

    device_configuration['build_conf'] = 'DebugLK'
    device_configuration['system'] = 'lk'

    with bot.BuildStep('Build %s' % device_configuration['build_conf']):
        Run(['make', '-C', 'third_party/lk', 'clean'])
        Run(['make', '-C', 'third_party/lk', '-j8'])

    with bot.BuildStep('Test %s' % device_configuration['build_conf']):
        # TODO(ajohnsen): This is kind of funky, as test.py tries to start the
        # background process using -a and -m flags. We should maybe changed so
        # test.py can have both a host and target configuration.
        StepTest(configuration=device_configuration,
                 debug_log=debug_log,
                 snapshot_run=True)
コード例 #3
0
def StepsCrossBuilder(debug_log, system, modes, arch):
    """This step builds XARM configurations and archives the results.

  The buildbot will trigger a build to run this cross builder. After it has
  built and archived build artifacts, the buildbot master will schedule a build
  for running the actual tests on a ARM device. The triggered build will
  eventually invoke the `StepsTargetRunner` function defined blow, which will
  take care of downloading/extracting the build artifacts and executing tests.
  """

    revision = os.environ.get('BUILDBOT_GOT_REVISION', '42')
    assert revision

    CrossCompile(system, modes, arch)

    tarball = TarballName(arch, revision)
    try:
        with bot.BuildStep('Create build tarball'):
            Run([
                'tar', '-cjf', tarball, '--exclude=**/obj',
                '--exclude=**/obj.host', '--exclude=**/obj.target', 'out'
            ])

        with bot.BuildStep('Upload build tarball'):
            uri = "%s/%s" % (GCS_BUCKET, tarball)
            Run([GSUTIL, 'cp', tarball, uri])
            Run([GSUTIL, 'setacl', 'public-read', uri])
    finally:
        if os.path.exists(tarball):
            os.remove(tarball)
コード例 #4
0
def target_builder(arch, mode):
    test_py = os.path.join('tools', 'test.py')
    test_args = [
        sys.executable, test_py, '--progress=line', '--report', '--time',
        '--compiler=none', '--runtime=vm', '--write-debug-log',
        '--write-test-outcome-log', '--mode=' + mode, '--arch=' + arch,
        '--exclude-suite=pkg'
    ]

    revision = int(os.environ['BUILDBOT_GOT_REVISION'])
    tarball = tarball_name(arch, mode, revision)
    temporary_files = [tarball]
    bot.Clobber()
    try:
        with bot.BuildStep('Fetch build tarball'):
            run([GSUTIL, 'cp', "%s/%s" % (GCS_BUCKET, tarball), tarball])

        with bot.BuildStep('Unpack build tarball'):
            run(['tar', '-xjf', tarball])

        with bot.BuildStep('execute tests'):
            run(test_args)

        with bot.BuildStep('execute checked_tests'):
            run(test_args + ['--checked', '--append_logs'])
    finally:
        for path in temporary_files:
            if os.path.exists(path):
                os.remove(path)
        # We always clobber this to save disk on the arm board.
        bot.Clobber(force=True)
コード例 #5
0
ファイル: fletch.py プロジェクト: sigurdm/fletch
def StepsLK(debug_log):
    # We need the fletch daemon process to compile snapshots.
    host_configuration = GetBuildConfigurations(utils.GuessOS(), ['debug'],
                                                ['ia32'], [False])[0]

    # Generate ninja files.
    StepGyp()

    StepBuild(host_configuration['build_conf'],
              host_configuration['build_dir'])

    build_config = 'DebugLK'

    with bot.BuildStep('Build %s' % build_config):
        Run(['make', '-C', 'third_party/lk', 'clean'])
        Run(['make', '-C', 'third_party/lk', '-j8'])

    with bot.BuildStep('Test %s' % build_config):
        # TODO(ajohnsen): This is kind of funky, as test.py tries to start the
        # background process using -a and -m flags. We should maybe changed so
        # test.py can have both a host and target configuration.
        StepTest(build_config,
                 'debug',
                 'ia32',
                 clang=False,
                 debug_log=debug_log,
                 system='lk',
                 snapshot_run=True,
                 configuration=host_configuration)
def ServicesSteps(build_info):
    build_root = utils.GetBuildRoot('linux')
    sdk_bin = utils.GetBuildSdkBin('linux', mode='release', arch='ia32')
    dart_services = os.path.join('third_party', 'dart-services')
    dart_services_copy = os.path.join(build_root, 'dart-services')

    with bot.BuildStep('Create copy of dart_services'):
        print 'Removing existing copy of dart_services'
        shutil.rmtree(dart_services_copy, ignore_errors=True)
        args = ['cp', '-R', dart_services, dart_services_copy]
        Run(args)

    with bot.BuildStep('Fixing pubspec file'):
        pubspec = os.path.join(dart_services_copy, 'pubspec.yaml')
        # TODO(lukechurch): Actually provide the name of the alternative pubspec
        testing_pubspec = os.path.join(dart_services_copy,
                                       'pubspec.foobar.yaml')
        print 'Fixing pubspec up for stress testing'
        # TODO(lukechurch): change to do the mv of the testing pubspec
        Run(['ls', pubspec])

    with bot.BuildStep('Run pub'):
        print 'Print running pub'
        pub = os.path.join(sdk_bin, 'pub')
        with utils.ChangedWorkingDirectory(dart_services_copy):
            args = [pub, 'get']

    with bot.BuildStep('Stress testing'):
        # Consider doing something more useful here.
        args = ['ls', 'third_party']
        Run(args)
コード例 #7
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
コード例 #8
0
def PubSteps(build_info):
  pub_location = os.path.join('third_party', 'pkg', 'pub')
  with bot.BuildStep('Running pub tests'):
    bot.RunTestRunner(build_info, pub_location)

  dartdoc_location = os.path.join('third_party', 'pkg', 'dartdoc')
  with bot.BuildStep('Running dartdoc tests'):
    bot.RunTestRunner(build_info, dartdoc_location)
コード例 #9
0
def StepsTargetRunner(debug_log, system, mode, arch):
    """This step downloads XARM build artifacts and runs tests.

  The buildbot master only triggers this step once the `StepCrossBuilder` step
  (defined above) has already been executed. This `StepsTargetRunner` can
  therefore download/extract the build artifacts which were archived by
  `StepCrossBuilder` and run the tests."""

    revision = os.environ['BUILDBOT_GOT_REVISION']

    tarball = TarballName(arch, revision)
    try:
        with bot.BuildStep('Fetch build tarball'):
            Run([GSUTIL, 'cp', "%s/%s" % (GCS_BUCKET, tarball), tarball])

        with bot.BuildStep('Unpack build tarball'):
            Run(['tar', '-xjf', tarball])

        # Run tests on all necessary configurations.
        configurations = GetBuildConfigurations(system=system,
                                                modes=[mode],
                                                archs=[arch],
                                                asans=[False],
                                                embedded_libs=[False],
                                                use_sdks=[False])
        for snapshot_run in [True, False]:
            for configuration in configurations:
                if not ShouldSkipConfiguration(snapshot_run, configuration):
                    build_dir = configuration['build_dir']

                    # Sanity check we got build artifacts which we expect.
                    assert os.path.exists(os.path.join(build_dir,
                                                       'dartino-vm'))

                    # TODO(kustermann): This is hackisch, but our current copying of the
                    # dart binary makes this a requirement.
                    dart_arm = 'third_party/bin/linux/dart-arm'
                    destination = os.path.join(build_dir, 'dart')
                    shutil.copyfile(dart_arm, destination)
                    shutil.copymode(dart_arm, destination)

                    StepDisableAnalytics(build_dir)

                    def run():
                        StepTest(configuration=configuration,
                                 snapshot_run=snapshot_run,
                                 debug_log=debug_log)

                    #RunWithCoreDumpArchiving(run, build_dir, build_conf)
                    run()
    finally:
        if os.path.exists(tarball):
            os.remove(tarball)

        # We always clobber this to save disk on the arm board.
        bot.Clobber(force=True)
コード例 #10
0
def Steps(config):
    SetupEnvironment(config)
    if config.system == 'mac':
        # gcc on mac is just an alias for clang.
        compiler_variants = ['Clang']
    else:
        compiler_variants = ['', 'Clang']

    mac = config.system == 'mac'

    # This makes us work from whereever we are called, and restores CWD in exit.
    with utils.ChangedWorkingDirectory(FLETCH_PATH):

        with bot.BuildStep('GYP'):
            Run(['ninja', '-v'])

        configurations = []

        for asan_variant in ['', 'Asan']:
            for compiler_variant in compiler_variants:
                for mode in ['Debug', 'Release']:
                    for arch in ['IA32', 'X64']:
                        build_conf = '%(mode)s%(arch)s%(clang)s%(asan)s' % {
                            'mode': mode,
                            'arch': arch,
                            'clang': compiler_variant,
                            'asan': asan_variant,
                        }
                        configurations.append({
                            'build_conf': build_conf,
                            'build_dir': 'out/%s' % build_conf,
                            'clang': bool(compiler_variant),
                            'asan': bool(asan_variant),
                            'mode': mode.lower(),
                            'arch': arch.lower(),
                        })

        for configuration in configurations:
            with bot.BuildStep('Build %s' % configuration['build_conf']):
                Run(['ninja', '-v', '-C', configuration['build_dir']])

        for configuration in configurations:
            if mac and configuration['arch'] == 'x64' and configuration['asan']:
                # Asan/x64 takes a long time on mac.
                pass
            else:
                RunTests(configuration['build_conf'],
                         configuration['mode'],
                         configuration['arch'],
                         mac=mac,
                         clang=configuration['clang'],
                         asan=configuration['asan'])
コード例 #11
0
ファイル: pub.py プロジェクト: abetss/bleeding_edge
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'])
コード例 #12
0
def BuildSDK():
    with bot.BuildStep('Build SDK'):
        sysroot_env = dict(os.environ)
        if BUILD_OS == 'linux':
            ia32root = os.path.join(bot_utils.DART_DIR, '..', 'sysroots',
                                    'build', 'linux',
                                    'debian_wheezy_i386-sysroot')
            sysroot_env['CXXFLAGS'] = (
                "--sysroot=%s -I=/usr/include/c++/4.6 "
                "-I=/usr/include/c++/4.6/i486-linux-gnu") % ia32root
            sysroot_env['LDFLAGS'] = '--sysroot=%s' % ia32root
            sysroot_env['CFLAGS'] = '--sysroot=%s' % ia32root
        Run([
            sys.executable, './tools/build.py', '--mode=release',
            '--arch=ia32', 'create_sdk'
        ],
            env=sysroot_env)

        x64root = os.path.join(bot_utils.DART_DIR, '..', 'sysroots', 'build',
                               'linux', 'debian_wheezy_amd64-sysroot')
        if BUILD_OS == 'linux':
            sysroot_env['CXXFLAGS'] = (
                "--sysroot=%s -I=/usr/include/c++/4.6 "
                "-I=/usr/include/c++/4.6/x86_64-linux-gnu") % x64root
            sysroot_env['LDFLAGS'] = '--sysroot=%s' % x64root
            sysroot_env['CFLAGS'] = '--sysroot=%s' % x64root
        Run([
            sys.executable, './tools/build.py', '--mode=release', '--arch=x64',
            'create_sdk'
        ],
            env=sysroot_env)
コード例 #13
0
def CopyAotBinaries(arch, sdk_path):
  product_sdk_path = BuildRootPath('dart-sdk', arch=arch, build_mode='product')
  # We don't support precompilation on ia32.
  if arch != 'ia32':
    with bot.BuildStep('Patching in PRODUCT built AOT binaries'):
      CopyBetween(product_sdk_path, sdk_path, 'bin', 'utils', GuessExtension('gen_snapshot'))
      CopyBetween(product_sdk_path, sdk_path, 'bin', GuessExtension('dartaotruntime'))
コード例 #14
0
def UploadAPKs(options):
    with bot.BuildStep('Upload apk'):
        revision = utils.GetSVNRevision()
        namer = bot_utils.GCSNamer(internal=True)
        # The version of gsutil we have on the bots is not new enough to support
        # the acl set commands.
        bot_utils.GSUtil.USE_DART_REPO_VERSION = True
        gsutil = bot_utils.GSUtil()

        # Archive dartuim
        local = os.path.join(options.build_products_dir, APK_LOCATION)
        # TODO(whesse): pass in arch and mode from reciepe
        remote = namer.dartium_android_apk_filepath(revision,
                                                    'dartium-android', 'arm',
                                                    'release')
        web_link_prefix = 'https://storage.cloud.google.com/'
        dartium_link = string.replace(remote, 'gs://', web_link_prefix)
        UploadSetACL(gsutil, local, remote)
        print "Uploaded dartium, available from: %s" % dartium_link

        # Archive content shell
        local = os.path.join(options.build_products_dir, CS_LOCATION)
        # TODO(whesse): pass in arch and mode from reciepe
        remote = namer.dartium_android_apk_filepath(revision,
                                                    'content_shell-android',
                                                    'arm', 'release')
        content_shell_link = string.replace(remote, 'gs://', web_link_prefix)
        UploadSetACL(gsutil, local, remote)
        print "Uploaded content shell, available from: %s" % content_shell_link
コード例 #15
0
ファイル: fletch.py プロジェクト: floitschG/fletch
def StepTest(
    name, mode, arch, clang=True, asan=False, snapshot_run=False,
    debug_log=None, configuration=None):
  step_name = '%s%s' % (name, '-snapshot' if snapshot_run else '')
  with bot.BuildStep('Test %s' % step_name, swallow_error=True):
    args = ['python', 'tools/test.py', '-m%s' % mode, '-a%s' % arch,
            '--time', '--report', '-pbuildbot',
            '--step_name=test_%s' % step_name,
            '--kill-persistent-process=0',
            '--run-gclient-hooks=0',
            '--build-before-testing=0',
            '--host-checked']
    if snapshot_run:
      # We let the fletch compiler compile tests to snapshots.
      # Afterwards we run the snapshot with
      #  - normal fletch VM
      #  - fletch VM with -Xunfold-program enabled
      args.extend(['-cfletchc', '-rfletchvm'])

    if asan:
      args.append('--asan')

    if clang:
      args.append('--clang')

    with TemporaryHomeDirectory():
      with open(os.path.expanduser("~/.fletch.log"), 'w+') as fletch_log:
        # Use a new persistent daemon for every test run.
        # Append it's stdout/stderr to the "~/.fletch.log" file.
        try:
          with PersistentFletchDaemon(configuration, fletch_log):
            Run(args)
        finally:
          # Copy "~/.fletch.log" to ".debug.log" and look for crashes.
          ProcessFletchLog(fletch_log, debug_log)
コード例 #16
0
def FTSlave(config):

    # Run SWTBot tests
    if len(sys.argv) > 0:
        scriptdir = os.path.dirname(sys.argv[0])
        builddir = os.path.join(scriptdir, '..', '..', 'editor', 'build')
        testScript = os.path.join(builddir, 'testswteditor.py')
        cmd = [sys.executable, testScript]
        try:
            subprocess.call(cmd, shell=IsWindows())
        except:
            pass

    # Prepare to run EggPlant tests
    with bot.BuildStep('Fetching editor'):
        revision = int(os.environ['BUILDBOT_GOT_REVISION'])
        bot_name, _ = bot.GetBotName()
        print bot_name
        channel = bot_utils.GetChannelFromName(bot_name)
        namer = bot_utils.GCSNamer(channel=channel)
        system = config.system
        if system == 'mac':
            system = 'macos'
        editor_path = namer.editor_zipfilepath(revision, system, 'x64')
        gsutils = bot_utils.GSUtil()
        editor_location = '/home/chrome-bot/Desktop'
        if system == 'macos':
            editor_location = '/Users/chrome-bot/Desktop'
        local_path = os.path.join(editor_location, 'editor.zip')
        if os.path.exists(local_path):
            os.remove(local_path)
        local_extracted = os.path.join(editor_location, 'dart')
        shutil.rmtree(local_extracted, ignore_errors=True)
        gsutils.execute(['cp', editor_path, local_path])
        Run(['unzip', local_path, '-d', editor_location])
コード例 #17
0
def StepsCreateArchiveRaspbianImge():
    EnsureRaspbianBase()
    with bot.BuildStep('Modifying raspbian image'):
        namer = GetNamer(temporary=IsBleedingEdge())
        raspbian_src = os.path.join('third_party', 'raspbian', 'image',
                                    'jessie.img')
        raspbian_dst = os.path.join('out', namer.raspbian_filename())
        print 'Copying %s to %s' % (raspbian_src, raspbian_dst)
        shutil.copyfile(raspbian_src, raspbian_dst)
        version = utils.GetSemanticSDKVersion()
        deb_file = os.path.join('out', namer.arm_agent_filename(version))
        src_file = os.path.join('out', namer.src_tar_name(version))
        Run([
            'tools/raspberry-pi2/raspbian_prepare.py',
            '--image=%s' % raspbian_dst,
            '--agent=%s' % deb_file,
            '--src=%s' % src_file
        ])
        zip_file = os.path.join('out', namer.raspbian_zipfilename())
        if os.path.exists(zip_file):
            os.remove(zip_file)
        CreateZip(raspbian_dst, namer.raspbian_zipfilename())
        gsutil = bot_utils.GSUtil()
        gs_path = namer.raspbian_zipfilepath(version)
        http_path = GetDownloadLink(gs_path)
        gsutil.upload(zip_file, gs_path, public=True)
        print '@@@STEP_LINK@download@%s@@@' % http_path
コード例 #18
0
def StepsGetDocs():
    with bot.BuildStep('Get docs'):
        version = utils.GetSemanticSDKVersion()
        gsutil = bot_utils.GSUtil()
        namer = GetNamer()
        docs_out = os.path.join('out')
        gs_path = namer.docs_filepath(version)
        gsutil.execute(['-m', 'cp', '-r', gs_path, docs_out])
コード例 #19
0
def StepsArchiveOpenOCD(system):
    with bot.BuildStep('Archive OpenOCD'):
        # TODO(ricow): Early return on bleeding edge when this is validated.
        namer = GetNamer(temporary=IsBleedingEdge())
        version = utils.GetSemanticSDKVersion()
        ArchiveThirdPartyTool('openocd',
                              namer.openocd_bundle_zipfilename(system), system,
                              namer.openocd_bundle_filepath(version, system))
コード例 #20
0
def StepsArchiveGCCArmNoneEabi(system):
    with bot.BuildStep('Archive cross compiler'):
        # TODO(ricow): Early return on bleeding edge when this is validated.
        namer = GetNamer(temporary=IsBleedingEdge())
        version = utils.GetSemanticSDKVersion()
        ArchiveThirdPartyTool(
            'gcc-arm-embedded', namer.gcc_embedded_bundle_zipfilename(system),
            system, namer.gcc_embedded_bundle_filepath(version, system))
コード例 #21
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'])
コード例 #22
0
ファイル: editor.py プロジェクト: bincker/source-map-debugger
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
コード例 #23
0
ファイル: pub.py プロジェクト: jurom/bleeding_edge
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)
コード例 #24
0
def StepsGetArmDeb():
    with bot.BuildStep('Get agent deb'):
        version = utils.GetSemanticSDKVersion()
        gsutil = bot_utils.GSUtil()
        namer = GetNamer()
        deb_file = os.path.join('out', namer.arm_agent_filename(version))
        gs_path = namer.arm_agent_filepath(version)
        if os.path.exists(deb_file):
            os.remove(deb_file)
        gsutil.execute(['cp', gs_path, deb_file])
コード例 #25
0
def StepsArchiveDebianPackage():
    with bot.BuildStep('Archive arm agent deb'):
        version = utils.GetSemanticSDKVersion()
        namer = GetNamer()
        gsutil = bot_utils.GSUtil()
        deb_file = os.path.join('out', namer.arm_agent_filename(version))
        gs_path = namer.arm_agent_filepath(version)
        http_path = GetDownloadLink(gs_path)
        gsutil.upload(deb_file, gs_path, public=True)
        print '@@@STEP_LINK@download@%s@@@' % http_path
コード例 #26
0
ファイル: dart_sdk.py プロジェクト: spbennett/sdk
def BuildAPIDocs():
    with bot.BuildStep('Build API docs'):
        Run([
            sys.executable, './tools/build.py', '--mode=release',
            '--arch=ia32', 'api_docs'
        ])
        Run([
            sys.executable, './tools/build.py', '--mode=release',
            '--arch=ia32', 'dartdocgen'
        ])
コード例 #27
0
def BuildSDK():
  with bot.BuildStep('Build SDK'):
    if BUILD_OS == 'linux':
      sysroot_env = dict(os.environ)
      sysroot_env['DART_USE_WHEEZY'] = '1'
      Run([sys.executable, './tools/generate_buildfiles.py'], env=sysroot_env)
    Run([sys.executable, './tools/build.py', '--mode=release',
         '--arch=ia32', 'create_sdk'])
    Run([sys.executable, './tools/build.py', '--mode=release',
         '--arch=x64', 'create_sdk'])
コード例 #28
0
ファイル: fletch.py プロジェクト: aam/fletch
def StepTest(configuration=None, snapshot_run=False, debug_log=None):
    name = configuration['build_conf']
    mode = configuration['mode']
    arch = configuration['arch']
    asan = configuration['asan']
    clang = configuration['clang']
    system = configuration['system']
    embedded_libs = configuration['embedded_libs']
    use_sdk = configuration['use_sdk']

    step_name = '%s%s' % (name, '-snapshot' if snapshot_run else '')
    with bot.BuildStep('Test %s' % step_name, swallow_error=True):
        args = [
            'python', 'tools/test.py',
            '-m%s' % mode,
            '-a%s' % arch, '--time', '--report', '-pbuildbot',
            '--step_name=test_%s' % step_name, '--kill-persistent-process=0',
            '--run-gclient-hooks=0', '--build-before-testing=0',
            '--host-checked'
        ]

        if system:
            system_argument = 'macos' if system == 'mac' else system
            args.append('-s%s' % system_argument)

        if snapshot_run:
            # We let the fletch compiler compile tests to snapshots.
            # Afterwards we run the snapshot with
            #  - normal fletch VM
            #  - fletch VM with -Xunfold-program enabled
            args.extend(['-cfletchc', '-rfletchvm'])

        if use_sdk:
            args.append('--use-sdk')

        if asan:
            args.append('--asan')

        if clang:
            args.append('--clang')

        if embedded_libs:
            args.append('--fletch-settings-file=embedded.fletch-settings')

        with TemporaryHomeDirectory():
            with open(os.path.expanduser("~/.fletch.log"), 'w+') as fletch_log:
                # Use a new persistent daemon for every test run.
                # Append it's stdout/stderr to the "~/.fletch.log" file.
                try:
                    with PersistentFletchDaemon(configuration, fletch_log):
                        Run(args)
                finally:
                    # Copy "~/.fletch.log" to ".debug.log" and look for crashes.
                    ProcessFletchLog(fletch_log, debug_log)
コード例 #29
0
def StepDisableAnalytics(bin_dir):
    with bot.BuildStep('Disable analytics'):
        dartino = os.path.join(bin_dir, 'dartino')
        try:
            print "%s disable analytics" % (dartino)
            print subprocess.check_output([dartino, 'disable', 'analytics'])
            print "Ensure background process is not running"
            print "%s quit" % (dartino)
            print subprocess.check_output([dartino, 'quit'])
        except Exception as error:
            print "Ignoring error: %s" % (error)
コード例 #30
0
ファイル: compiler.py プロジェクト: abetss/bleeding_edge
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)