运行rebar eunit时,将运行时参数传递给erlang [英] passing runtime arguments to erlang when running rebar eunit

查看:162
本文介绍了运行rebar eunit时,将运行时参数传递给erlang的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  erl -args_file vm.args 

在我的启动脚本中, code>

目前,在尝试使用 rebar eunit 运行单元测试时方式可以将自定义运行时参数(如-args_file选项)传递给螺纹钢开始的erlang过程?我搜索的文档高低无效...



我感谢帮助。

解决方案

我回答了我自己的问题。我使用ERL_FLAGS变量来传递命令行参数。这是Makefile中的一段代码:

  ERL_FLAGS = -  args_file test / conf / vm.eunit.args./rebar skip_deps = true eunit 


In my startup script, I am starting erlang with:

erl -args_file vm.args

Currently, while trying to run unit tests with rebar eunit is there a way for me to pass custom runtime arguments such as the -args_file option to the erlang process that rebar kicks off? I have searched docs high and low to no avail...

I appreciate the help.

解决方案

I answered my own question. I use the ERL_FLAGS variable to pass command line args. Here is a snippet from my Makefile:

ERL_FLAGS="-args_file test/conf/vm.eunit.args" ./rebar skip_deps=true eunit

这篇关于运行rebar eunit时,将运行时参数传递给erlang的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆