【发布时间】:2014-10-23 07:31:28
【问题描述】:
我正在尝试在我的 RakeFile 中运行以下 shell 命令
exclusions = args.version >= "7" ? " -t ~@failing-scenario" : ""
current_date = DateTime.now.to_s
t.cucumber_opts = "-r Frank/features " + args.selection + (args.idiom == "ipad" ? " -t ~@iphone" : " -t ~@ipad") + exclusions + " --out ci_artifacts/frank_results"+current_date+".txt --format pretty --format html --out ci_artifacts/frank_results.html --format junit --out ci_artifacts"
sh 'tail -n 3 ci_artifacts/frank_results" + current_date + ".txt >> frank_runtimes.txt'
当我在sh 中运行shell 命令时,我尝试访问的文件不再存在,但如果我尝试在cucumber_opts 中运行该命令,它无法识别tail 命令并且需要一个目录。
基本上我要做的是保存 Frank 的所有输出,然后获取实际输出时间并将它们保存在不同的文件夹中。
【问题讨论】: