在我的启动脚本中,我使用以下命令启动 erlang:
erl -args_file vm.args
目前,在尝试使用 rebar eunit
运行单元测试时,有没有办法将自定义运行时参数(例如 -args_file 选项)传递给 rebar 启动的 erlang 进程?我搜索了文档高低无济于事...
感谢您的帮助。
最佳答案
我回答了我自己的问题。我使用 ERL_FLAGS 变量来传递命令行参数。这是我的 Makefile 中的一个片段:
ERL_FLAGS="-args_file test/conf/vm.eunit.args" ./rebar skip_deps=true eunit
关于erlang - 运行 rebar eunit 时将运行时参数传递给 erlang,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10307575/