in annotated_steps.py [0:0]
def RunTestRunner(bot_info, test_package, package_path):
package_name = os.path.basename(package_path)
if package_name == '':
# when package_path had a trailing slash
package_name = os.path.basename(os.path.dirname(package_path))
pub = GetPub(bot_info)
extra_env = GetPubEnv(bot_info)
with BuildStep('pub run test', swallow_error=True):
# TODO(nweiz): include dartium here once sdk#23816 is fixed.
platforms = set(['vm', 'chrome', 'firefox'])
if bot_info.system == 'windows':
platforms.add('ie')
# TODO(nweiz): remove dartium here once sdk#23816 is fixed.
elif bot_info.system == 'mac':
platforms.add('safari')
platforms.remove('firefox')
if 'platforms' in test_package:
platforms = platforms.intersection(set(test_package['platforms']))
with utils.ChangedWorkingDirectory(package_path):
test_args = [pub, 'run', 'test', '--reporter', 'expanded', '--no-color',
'--platform', ','.join(platforms)]
if bot_info.package_name in SERIALIZED_PACKAGES:
test_args.append('-j1')
# TODO(6): If barback is needed, use --pub-serve option and pub serve test
if test_package.get('barback'): test_args.append('build/test')
_RunWithXvfb(bot_info, test_args, extra_env=extra_env)