Sha256: b5535170632050d42e6279e9fd984177b8055f54674ab1901a557dc7cd2c4868
Contents?: true
Size: 1.21 KB
Versions: 2
Compression:
Stored size: 1.21 KB
Contents
#!/usr/bin/env ruby Version = File.read(File.expand_path('../../VERSION', __FILE__)) require 'optparse' $: << File.dirname(__FILE__) + '/../lib' require 'crash_monkey' opts = {} ARGV.options do |o| o.on('-a app_name', 'Target Application(Required)') {|b| opts[:app_path] = b} o.on('-n run_count', 'How many times monkeys run(default: 2)') {|b| opts[:run_count] = b.to_i} o.on('-d result_dir', 'Where to output result(default: ./crash_monkey_result)') {|b| opts[:result_base_dir] = File.expand_path(b)} o.on('-t time_limit_sec', 'Time limit of running(default: 100 sec)') {|b| opts[:time_limit_sec] = b.to_i} o.on('-c config_path', 'Configuration JSON Path') {|b| opts[:config_path] = File.expand_path(b)} o.on('--show-config', 'Show Current Configuration JSON') {|_| opts[:show_config] = true} o.on('--list-app', 'Show List of Installed Apps in iOS Simulator') {|_| opts[:list_app] = true} o.parse! end unless opts[:app_path] || opts[:show_config] || opts[:list_app] puts ARGV.options.help exit(1) end opts[:run_count] ||= 2 opts[:time_limit_sec] ||= 100 result_ok = UIAutoMonkey::MonkeyRunner.new.run(opts) puts result_ok ? 'EXIT 0' : 'EXIT 1' unless opts[:show_config] || opts[:list_app] exit(result_ok ? 0 : 1)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
crash_monkey-0.1.7 | bin/crash_monkey |
crash_monkey-0.1.6 | bin/crash_monkey |