I am using rebar, and I need to set the mnesia directory for my Erlang eunit tests (which you can usually do by doing erl -mnesia dir DIRECTORY
at the cmdline). How do I run eunit tests with a special mnesia dir with rebar?
I do not think that the erl_opts
section of the rebar.conf file will help because the mnesia directory is an emulator argument and I don't think it can be set through erlang. Also, I think these are options for when rebar compiles your code, not when it runs eunit tests. However, even if it did work, it will not work for me because I need to be able to set the directory dynamically (I am writing a Makefile where different targets have different db dirs).