示例#1
0
def main():
    # We need to chdir() to src/dart in order to get the correct revision number.
    with utils.ChangedWorkingDirectory(DART_PATH):
        dart_tools_utils = imp.load_source('dart_tools_utils',
                                           os.path.join('tools', 'utils.py'))
        dart_revision = dart_tools_utils.GetSVNRevision()

    version = dart_revision + '.0'
    info = upload_steps.BuildInfo(version, dart_revision)

    result = 0

    # Archive to the revision bucket unless integration build
    if info.channel != 'integration':
        result = upload_steps.ArchiveAndUpload(info, archive_latest=False)
        # On dev/stable we archive to the latest bucket as well
        if info.channel != 'be':
            result = (upload_steps.ArchiveAndUpload(info, archive_latest=True)
                      or result)

    # Run layout tests
    if info.mode == 'Release' or platform.system() != 'Darwin':
        result = Test(info, 'drt', 'layout', 'unchecked') or result
        result = Test(info, 'drt', 'layout', 'checked') or result

    # Run dartium tests
    result = Test(info, 'dartium', 'core', 'unchecked') or result
    result = Test(info, 'dartium', 'core', 'checked') or result

    # Run ContentShell tests
    # NOTE: We don't run ContentShell tests on dartium-*-inc builders to keep
    # cycle times down.
    if not info.is_incremental:
        # If we run all checked tests on dartium, we restrict the number of
        # unchecked tests on drt to DRT_FILTER
        result = Test(info, 'drt', 'core', 'unchecked',
                      test_filter=DRT_FILTER) or result
        result = Test(info, 'drt', 'core', 'checked') or result

    # On the 'be' channel, we only archive to the latest bucket if all tests were
    # successful.
    if result == 0 and info.channel == 'be':
        result = upload_steps.ArchiveAndUpload(info,
                                               archive_latest=True) or result
示例#2
0
def main():
    if (upload_steps.BuildInfo('', '').channel == 'be'):
        revision = sys.argv[1]
    else:
        multivm_deps = os.path.join(os.path.dirname(SRC_PATH), 'multivm.deps')
        revision_directory = (multivm_deps if
                              (os.path.isdir(multivm_deps)) else os.path.join(
                                  SRC_PATH, 'dart'))
        output, _ = subprocess.Popen(['svn', 'info'],
                                     stdout=subprocess.PIPE,
                                     stderr=subprocess.STDOUT,
                                     shell=(platform.system() == 'Windows'),
                                     cwd=revision_directory).communicate()
        revision = re.search('Last Changed Rev: (\d+)', output).group(1)

    version = revision + '.0'
    info = upload_steps.BuildInfo(version, revision)
    if info.is_build:
        upload_steps.ArchiveAndUpload(info, archive_latest=False)