def StepArmRunHooks(): if getos.GetPlatform() != 'linux': return # Run 'gclient runhooks' for arm, as some arm specific tools are only # installed in that case. buildbot_common.BuildStep('gclient runhooks for arm') env = dict(os.environ) env['GYP_DEFINES'] = 'target_arch=arm' Run(['gclient', 'runhooks'], env=env, cwd=SDK_SRC_DIR)
def StepTestSDK(): cmd = [] if getos.GetPlatform() == 'linux': # Run all of test_sdk.py under xvfb-run; it's startup time leaves something # to be desired, so only start it up once. cmd.extend(['xvfb-run', '--auto-servernum']) cmd.extend([sys.executable, 'test_sdk.py']) Run(cmd, cwd=SCRIPT_DIR)
def StepRunUnittests(): buildbot_common.BuildStep('Run unittests') # Our tests shouldn't be using the proxy; they should all be connecting to # localhost. Some slaves can't route HTTP traffic through the proxy to # localhost (we get 504 gateway errors), so we clear it here. env = dict(os.environ) if 'http_proxy' in env: del env['http_proxy'] Run([sys.executable, 'test_all.py', '-v'], env=env, cwd=SDK_SRC_DIR)
def StepTestSDK(): cmd = [] if getos.GetPlatform() == 'linux': # Run all of test_sdk.py under xvfb-run; it's startup time leaves something # to be desired, so only start it up once. # We also need to make sure that there are at least 24 bits per pixel. # https://code.google.com/p/chromium/issues/detail?id=316687 cmd.extend([ 'xvfb-run', '--auto-servernum', '--server-args', '-screen 0 1024x768x24' ]) cmd.extend([sys.executable, 'test_sdk.py']) Run(cmd, cwd=SCRIPT_DIR)
def StepTestSDK(): cmd = [] if getos.GetPlatform() == 'linux': # Run all of test_sdk.py under xvfb-run; it's startup time leaves something # to be desired, so only start it up once. # We also need to make sure that there are at least 24 bits per pixel. # https://code.google.com/p/chromium/issues/detail?id=316687 cmd.extend([ 'xvfb-run', '--auto-servernum', '--server-args', '-screen 0 1024x768x24' ]) cmd.extend([sys.executable, 'test_sdk.py']) # TODO(noelallen): crbug 386332 # For Bionic SDK, only build do a build test until we have hardware. if 'bionic' in os.getenv('BUILDBOT_BUILDERNAME', ''): cmd.extend(['build_examples', 'copy_tests', 'build_tests']) Run(cmd, cwd=SCRIPT_DIR)
def StepBuildSDK(): is_win = getos.GetPlatform() == 'win' # Windows has a path length limit of 255 characters, after joining cwd with a # relative path. Use subst before building to keep the path lengths short. if is_win: subst_drive = 'S:' root_dir = os.path.dirname(SRC_DIR) new_root_dir = subst_drive + '\\' subprocess.check_call(['subst', subst_drive, root_dir]) new_script_dir = os.path.join(new_root_dir, os.path.relpath(SCRIPT_DIR, root_dir)) else: new_script_dir = SCRIPT_DIR try: Run([sys.executable, 'build_sdk.py'], cwd=new_script_dir) finally: if is_win: subprocess.check_call(['subst', '/D', subst_drive])
def StepTestSDK(): Run([sys.executable, 'test_sdk.py'], cwd=SCRIPT_DIR)