lib/actir/parallel_tests/cli.rb in actir-1.1.0 vs lib/actir/parallel_tests/cli.rb in actir-1.1.1

- old
+ new

@@ -58,11 +58,17 @@ num_processes = address.size end #更新百度支付-百付宝的cookies if options[:update] - Actir::CookiesBaidu.update_all + begin + Actir::CookiesBaidu.update_all + rescue Exception => e + #若更新baidu_cookies失败,则打印错误信息,并中断测试执行 + puts e.message + abort "update baidu cookies failed!!!" + end end #计算重跑次数 re_run_times = Actir::ParallelTests.determine_times_of_rerun(options[:rerun]) #报用例数 @@ -168,10 +174,11 @@ opts.banner = <<-BANNER.gsub(/^ /, '') Run all tests in parallel Usage: ruby [switches] [--] [files & folders] Options are: BANNER - opts.on("-n [PROCESSES]", Integer, "How many processes to use, default: 1") { |n| options[:count] = n } + # opts.on("-n [PROCESSES]", Integer, "How many processes to use, default: 1") { |n| options[:count] = n } + opts.on("-n [TESTCASE]", String, "Run this testcase") { |casename| options[:testcase] = casename } opts.on("--group-by [TYPE]", <<-TEXT.gsub(/^ /, '') group tests by: found - order of finding files filesize - by size of the file default - filesize