def _RunMonkeyTests(options, error_func, devices): """Subcommand of RunTestsCommands which runs monkey tests.""" monkey_options = ProcessMonkeyTestOptions(options, error_func) runner_factory, tests = monkey_setup.Setup(monkey_options) results, exit_code = test_dispatcher.RunTests( tests, runner_factory, devices, shard=False, test_timeout=None, num_retries=options.num_retries) report_results.LogFull( results=results, test_type='Monkey', test_package='Monkey') return exit_code
def _RunMonkeyTests(args, devices): """Subcommand of RunTestsCommands which runs monkey tests.""" monkey_options = ProcessMonkeyTestOptions(args) runner_factory, tests = monkey_setup.Setup(monkey_options) results, exit_code = test_dispatcher.RunTests( tests, runner_factory, devices, shard=False, test_timeout=None, num_retries=args.num_retries) report_results.LogFull( results=results, test_type='Monkey', test_package='Monkey') if args.json_results_file: json_results.GenerateJsonResultsFile([results], args.json_results_file) return exit_code