def _process_args(raw_args): args = parse_args(raw_args) logging_util.setup( level=logging.DEBUG if args.output == 'verbose' else logging.WARNING) OPTIONS.parse_configure_file() # Limit to one job at a time when running a suite multiple times. Otherwise # suites start interfering with each others operations and bad things happen. if args.repeat_runs > 1: args.jobs = 1 if args.buildbot and OPTIONS.weird(): args.exclude_patterns.append('cts.*') # Fixup all patterns to at least be a prefix match for all tests. # This allows options like "-t cts.CtsHardwareTestCases" to work to select all # the tests in the suite. args.include_patterns = [(pattern if '*' in pattern else (pattern + '*')) for pattern in args.include_patterns] args.exclude_patterns = [(pattern if '*' in pattern else (pattern + '*')) for pattern in args.exclude_patterns] set_test_global_state(args) if (not args.remote and args.buildbot and not platform_util.is_running_on_cygwin()): print_chrome_version() if platform_util.is_running_on_remote_host(): args.run_ninja = False return args
def main(): parser = ResponseFileArgumentParser() parser.add_argument( 'files', nargs='*', help='The list of files to lint. If no files provided, ' 'will lint all files.') parser.add_argument( '--ignore', '-i', dest='ignore_file', help='A text file containting list of files to ignore.') parser.add_argument('--merge', action='store_true', help='Merge results.') parser.add_argument('--output', '-o', help='Output file for storing results.') parser.add_argument('--verbose', '-v', action='store_true', help='Prints additional output.') args = parser.parse_args() logging_util.setup( level=logging.DEBUG if args.verbose else logging.WARNING) if not args.ignore_file and not args.files: args.ignore_file = os.path.join(os.path.dirname(__file__), 'lint_ignore.txt') if args.merge: return merge_results(args.files, args.output) else: return process(args.files, args.ignore_file, args.output)
def main(): OPTIONS.parse_configure_file() parser = argparse.ArgumentParser( description=__doc__, formatter_class=argparse.RawTextHelpFormatter) parser.add_argument('mode', choices=_TEST_CLASS_MAP.keys()) parser.add_argument( '--iterations', default=20, type=int, help=('Number of iterations to run after warmup phase. ' 'The default is 20.')) parser.add_argument('--test-mode', action='store_true', help='Test mode. Parse %s and exit.' % _OUTPUT_LOG_FILE) parser.add_argument('--verbose', '-v', action='store_true', help='Verbose mode') remote_executor.add_remote_arguments(parser) args = parser.parse_args() remote_executor.maybe_detect_remote_host_type(args) logging_util.setup( level=logging.DEBUG if args.verbose else logging.WARNING) clazz = create_test_class(args.mode) clazz(args).main()
def main(): args = _parse_args() logging_util.setup() OPTIONS.parse_configure_file() if args.mode == 'stackwalk': _stackwalk(args.minidump) elif args.mode == 'dump': _dump(args.minidump)
def main(): signal_util.setup() OPTIONS.parse_configure_file() parsed_args = launch_chrome_options.parse_args(sys.argv) logging_util.setup( level=logging.DEBUG if parsed_args.verbose else logging.INFO) _prepare_chrome_user_data_dir(parsed_args) global _CHROME_PID_PATH _CHROME_PID_PATH = os.path.join(_USER_DATA_DIR, 'chrome.pid') # If there is an X server at :0.0 and GPU is enabled, set it as the # current display. if parsed_args.display: os.environ['DISPLAY'] = parsed_args.display os.chdir(_ROOT_DIR) if not parsed_args.remote: _kill_running_chrome() if parsed_args.run_ninja: build_common.run_ninja() ld_library_path = os.environ.get('LD_LIBRARY_PATH') lib_paths = ld_library_path.split(':') if ld_library_path else [] lib_paths.append(build_common.get_load_library_path()) # Add the directory of the chrome binary so that .so files in the directory # can be loaded. This is needed for loading libudev.so.0. # TODO(crbug.com/375609): Remove the hack once it becomes no longer needed. lib_paths.append(os.path.dirname(_get_chrome_path(parsed_args))) os.environ['LD_LIBRARY_PATH'] = ':'.join(lib_paths) launch_chrome_util.set_environment_for_chrome() if not platform_util.is_running_on_remote_host(): _check_apk_existence(parsed_args) if not platform_util.is_running_on_remote_host(): prep_launch_chrome.prepare_crx(parsed_args) prep_launch_chrome.remove_crx_at_exit_if_needed(parsed_args) if parsed_args.remote: remote_executor.launch_remote_chrome(parsed_args, sys.argv[1:]) else: platform_util.assert_machine(OPTIONS.target()) _check_crx_existence(parsed_args) _run_chrome_iterations(parsed_args) return 0
def main(args): parser = argparse.ArgumentParser() parser.add_argument('-v', '--verbose', action='store_true', help='Emit ' 'verbose output.') parser.add_argument('-r', '--roll-forward', dest='roll', action='store_true', help='Update pinned NaCl SDK manifest version to the ' 'latest..') download_package_util_flags.add_extra_flags(parser) args = parser.parse_args(args) logging_util.setup(level=logging.DEBUG if args.verbose else logging.WARNING) if args.roll: roll_pinned_manifest_forward() check_and_perform_updates(args.download_cache_path, args.download_cache_size)
def main(): parser = ResponseFileArgumentParser() parser.add_argument( "files", nargs="*", help="The list of files to lint. If no files provided, " "will lint all files." ) parser.add_argument("--ignore", "-i", dest="ignore_file", help="A text file containting list of files to ignore.") parser.add_argument("--merge", action="store_true", help="Merge results.") parser.add_argument("--output", "-o", help="Output file for storing results.") parser.add_argument("--verbose", "-v", action="store_true", help="Prints additional output.") args = parser.parse_args() logging_util.setup(level=logging.DEBUG if args.verbose else logging.WARNING) if not args.ignore_file and not args.files: args.ignore_file = os.path.join(os.path.dirname(__file__), "lint_ignore.txt") if args.merge: return merge_results(args.files, args.output) else: return process(args.files, args.ignore_file, args.output)
def main(): OPTIONS.parse_configure_file() parser = argparse.ArgumentParser( description=__doc__, formatter_class=argparse.RawTextHelpFormatter) parser.add_argument('mode', choices=_TEST_CLASS_MAP.keys()) parser.add_argument('--iterations', default=20, type=int, help=('Number of iterations to run after warmup phase. ' 'The default is 20.')) parser.add_argument('--test-mode', action='store_true', help='Test mode. Parse %s and exit.' % _OUTPUT_LOG_FILE) parser.add_argument('--verbose', '-v', action='store_true', help='Verbose mode') remote_executor.add_remote_arguments(parser) args = parser.parse_args() remote_executor.maybe_detect_remote_host_type(args) logging_util.setup(level=logging.DEBUG if args.verbose else logging.WARNING) clazz = create_test_class(args.mode) clazz(args).main()
def main(args): parser = argparse.ArgumentParser() parser.add_argument('-v', '--verbose', action='store_true', help='Emit ' 'verbose output.') parser.add_argument('-r', '--roll-forward', dest='roll', action='store_true', help='Update pinned NaCl SDK manifest version to the ' 'latest..') download_package_util_flags.add_extra_flags(parser) args = parser.parse_args(args) logging_util.setup( level=logging.DEBUG if args.verbose else logging.WARNING) if args.roll: roll_pinned_manifest_forward() check_and_perform_updates(args.download_cache_path, args.download_cache_size)
def main(): OPTIONS.parse_configure_file() parsed_args = _parse_args(sys.argv[1:]) logging_util.setup( level=logging.DEBUG if parsed_args.verbose else logging.INFO) return parsed_args.entrypoint(parsed_args)