def main(): context = buildbot_lib.BuildContext() setup_buildbot_context(context) status = buildbot_lib.BuildStatus(context) # TODO(dschuff): it's a pain to pass through unknown arguments with optparse, # but if we add more, or once we have argparse (python2.7) everywhere, switch. try: if sys.argv[1] == 'clean': clean() sys.exit(0) if sys.argv[1] == 'install-tests': install_tests(context) sys.exit(0) compiler = sys.argv[1] platform = sys.argv[2] tester_argv = sys.argv[3:] except IndexError: usage() sys.exit(1) # --bot is passed by the bot script, which needs to install the tests if '--bot' in tester_argv: install_tests(context) tester_argv.remove('--bot') return run_torture(status, compiler, platform, tester_argv)
def main(): context = buildbot_lib.BuildContext() setup_buildbot_context(context) status = buildbot_lib.BuildStatus(context) # TODO(dschuff): it's a pain to pass through unknown arguments with optparse, # but if we add more, or once we have argparse (python2.7) everywhere, switch. try: compiler = sys.argv[1] platform = sys.argv[2] tester_argv = sys.argv[3:] except IndexError: usage() sys.exit(1) return run_torture(status, compiler, platform, tester_argv)
def main(): context = buildbot_lib.BuildContext() buildbot_lib.SetDefaultContextAttributes(context) context['max_jobs'] = int(os.environ.get('PNACL_CONCURRENCY', 4)) status = buildbot_lib.BuildStatus(context) # TODO(dschuff): it's a pain to pass through unknown arguments with optparse, # but if we add more, or once we have argparse (python2.7) everywhere, switch. try: compiler = sys.argv[1] platform = sys.argv[2] tester_argv = sys.argv[3:] except IndexError: usage() sys.exit(1) return run_torture(status, compiler, platform, tester_argv)
parser.add_argument('--no-goma', action='store_true', default=False, help='Do not run with goma') args = parser.parse_args() host_os = buildbot_lib.GetHostPlatform() if args.sanitize: if host_os != 'linux' or args.tests_arch != 'x86-64': raise Exception("Error: Can't run sanitize bot unless linux x86-64") # This is a minimal context, not useful for running tests yet, but enough for # basic Step handling. context = buildbot_lib.BuildContext() buildbot_lib.SetDefaultContextAttributes(context) context['pnacl'] = True status = buildbot_lib.BuildStatus(context) toolchain_install_dir = os.path.join( NACL_DIR, 'toolchain', '%s_%s' % (host_os, pynacl.platform.GetArch()), 'pnacl_newlib') use_goma = buildbot_lib.RunningOnBuildbot() and not args.no_goma def ToolchainBuildCmd(sync=False, extra_flags=[]): sync_flag = ['--sync'] if sync else [] executable_args = [os.path.join('toolchain_build','toolchain_build_pnacl.py'), '--verbose', '--clobber', '--packages-file', TEMP_PACKAGES_FILE]