예제 #1
0
def eh_tests(context, config, exclude, extra_args, use_sjlj_eh):
    # TODO: toolchain_tester.py runnable as a library?
    command = [
        'tools/toolchain_tester/toolchain_tester.py',
        '--exclude=tools/toolchain_tester/' + exclude,
        '--exclude=tools/toolchain_tester/unsuitable_dejagnu_tests.txt',
        '--config=' + config
    ]
    if 'pnacl' in config:
        command.append(
            '--append_file=tools/toolchain_tester/extra_flags_pnacl.txt')
        if use_sjlj_eh:
            command.append('--append=CFLAGS:--pnacl-exceptions=sjlj')
        else:
            command.append('--append=CFLAGS:--pnacl-allow-exceptions')
            command.append('--append=FINALIZE_FLAGS:--no-finalize')
            command.append('--append=TRANSLATE_FLAGS:--pnacl-allow-exceptions')
            command.append(
                '--append=TRANSLATE_FLAGS:--allow-llvm-bitcode-input')
    command.extend(extra_args)
    command.extend(glob.glob(os.path.join(TEST_PATH_CPP, 'eh', '*.C')))
    print command
    try:
        return buildbot_lib.Command(context, command)
    except buildbot_lib.StepFailed:
        return 1
예제 #2
0
def eh_tests(context, config, exclude, extra_args):
  # TODO: toolchain_tester.py runnable as a library?
  command = ['tools/toolchain_tester/toolchain_tester.py',
             '--exclude=tools/toolchain_tester/' + exclude,
             '--exclude=tools/toolchain_tester/unsuitable_dejagnu_tests.txt',
             '--config=' + config]
  if 'pnacl' in config:
    command.append('--append_file=tools/toolchain_tester/extra_flags_pnacl.txt')
    command.append('--append=CFLAGS:--pnacl-exceptions=sjlj')
  command.extend(extra_args)
  command.extend(list_tests(TEST_PATH_CPP, 'eh', '*.C'))
  print command
  try:
    return buildbot_lib.Command(context, command)
  except buildbot_lib.StepFailed:
    return 1
예제 #3
0
def standard_tests(context, config, exclude, extra_args):
  # TODO: make toolchain_tester.py runnable as a library?
  command = ['tools/toolchain_tester/toolchain_tester.py',
             '--exclude=tools/toolchain_tester/' + exclude,
             '--exclude=tools/toolchain_tester/known_failures_base.txt',
             '--config=' + config,
             '--append=CFLAGS:-std=gnu89']
  if 'pnacl' in config:
    command.append('--append_file=tools/toolchain_tester/extra_flags_pnacl.txt')
  command.extend(extra_args)
  command.extend(list_tests(TEST_PATH_C, '*c'))
  command.extend(list_tests(TEST_PATH_C, 'ieee', '*c'))
  print command
  try:
    return buildbot_lib.Command(context, command)
  except buildbot_lib.StepFailed:
    return 1
예제 #4
0
def prereqs_pnacl(context):
    return buildbot_lib.Command(context, ('pnacl/build.sh', 'sdk', 'newlib'))
  logging.info('Running: ' + ' '.join(cmd))
  subprocess.check_call(cmd)
  sys.stdout.flush()


# Clean out any installed toolchain parts that were built by previous bot runs.
with buildbot_lib.Step('Clobber TC install dir', status):
  print 'Removing', toolchain_install_dir
  pynacl.file_tools.RemoveDirectoryIfPresent(toolchain_install_dir)


# Run checkdeps so that the PNaCl toolchain trybots catch mistakes that would
# cause the normal NaCl bots to fail.
with buildbot_lib.Step('checkdeps', status):
  buildbot_lib.Command(
      context,
      [sys.executable,
       os.path.join(NACL_DIR, 'tools', 'checkdeps', 'checkdeps.py')])


if host_os != 'win':
  with buildbot_lib.Step('update clang', status):
    buildbot_lib.Command(
        context,
        [sys.executable,
         os.path.join(
             NACL_DIR, '..', 'tools', 'clang', 'scripts', 'update.py')])

if use_goma:
  buildbot_lib.Command(context, cmd=[
      sys.executable, '/b/build/goma/goma_ctl.py', 'restart'])
예제 #6
0
    sync_flag = ['--sync'] if sync else []
    return executable + [
        # The path to the script is a relative path with forward slashes so it is
        # interpreted properly when it uses __file__ inside cygwin
        'toolchain_build/toolchain_build_pnacl.py',
        '--verbose',
        '--clobber',
        '--build-64bit-host',
        '--install',
        toolchain_install_dir,
    ] + sync_flag + extra_flags


# Sync the git repos used by build.sh
with buildbot_lib.Step('Sync build.sh repos', status, halt_on_fail=True):
    buildbot_lib.Command(context,
                         ToolchainBuildCmd(extra_flags=['--legacy-repo-sync']))

# Clean out any installed toolchain parts that were built by previous bot runs.
with buildbot_lib.Step('Sync TC install dir', status):
    pynacl.file_tools.RemoveDirectoryIfPresent(toolchain_install_dir)
    buildbot_lib.Command(context, [
        sys.executable, PACKAGE_VERSION_SCRIPT, '--packages', 'pnacl_newlib',
        'sync', '--extract'
    ])

# Run checkdeps so that the PNaCl toolchain trybots catch mistakes that would
# cause the normal NaCl bots to fail.
with buildbot_lib.Step('checkdeps', status):
    buildbot_lib.Command(context, [
        sys.executable,
        os.path.join(NACL_DIR, 'tools', 'checkdeps', 'checkdeps.py')
    print 'Bash version:'
    sys.stdout.flush()
    subprocess.check_call([bash , '--version'])
  except subprocess.CalledProcessError:
    print 'Bash not found in path!'
    raise buildbot_lib.StepFailed()

toolchain_build_cmd = [
    sys.executable,
    os.path.join(
        NACL_DIR, 'toolchain_build', 'toolchain_build_pnacl.py'),
    '--verbose', '--sync', '--clobber', '--build-64bit-host']

# Sync the git repos used by build.sh
with buildbot_lib.Step('Sync build.sh repos', status, halt_on_fail=True):
  buildbot_lib.Command(context, toolchain_build_cmd + ['--legacy-repo-sync'])

# Run toolchain_build.py first. Its outputs are not actually being used yet.
# toolchain_build outputs its own buildbot annotations, so don't use
# buildbot_lib.Step to run it here.
try:
  gsd_arg = []
  if args.buildbot:
    gsd_arg = ['--buildbot']
  elif args.trybot:
    gsd_arg = ['--trybot']

  cmd = toolchain_build_cmd + gsd_arg
  logging.info('Running: ' + ' '.join(cmd))
  subprocess.check_call(cmd)
except subprocess.CalledProcessError:
예제 #8
0
def install_tests(context):
  if not os.path.exists(TEST_ROOT):
    os.makedirs(TEST_ROOT)
  tarball = os.path.join(TEST_ROOT, 'test_tarball.tgz')
  download_or_copy(TEST_TARBALL_URL, tarball)
  return buildbot_lib.Command(context, ('tar', 'jxf', tarball, '-C', TEST_ROOT))