I have been trying to export all the functions in an erlang module for use in a common test SUITE, not an eunit module. So far it has not worked for me. I am using rebar to run the SUITE, and I came across this question (http://lists.basho.com/pipermail/rebar_lists.basho.com/2011-October/001141.html), which is essentially exactly what I want to do, but the method will not work for me.
I have also added {plugins, [rebar_ct]}. into rebar.config but it has made no difference. I should point out all my tests pass when I export the functions normally, but I want to avoid this.
Any help would be great thanks.
The compiler will cause all functions in a module to be exported if you add this into it:
Or you could do it based on defs, like:
That will only export everything if you have
{d, 'EXPORTALL', true}in your rebar configerl_optssetting, e.g. something like:If that doesn't work, make sure you don't have
erl_optstwice in your rebar config.