Common Test problems with includes since 17.4

Nico Kruber <[email protected]>
Newsgroups gmane.comp.lang.erlang.bugs
Message-ID <[email protected]>
Since Erlang 17.4 Common Test seems to have problems with included .hrl files 
outside of the folder the unit test resides in (even when passing the 
appropriate "include" option). The make process succeeds but when the test is 
actually run, a badarg is thrown:

EXIT, reason {{badarg,{tree,macro,{attr,0,[],none},{macro,
{var,0,'RT'},none}}},
[{erl_syntax,concrete,1,[{file,"erl_syntax.erl"},{line,6188}]},
 {erl_syntax,concrete_list,1, [{file,"erl_syntax.erl"},{line,6192}]},
 {erl_syntax,concrete_list,1, [{file,"erl_syntax.erl"},{line,6192}]},
 {erl_syntax,concrete,1,[{file,"erl_syntax.erl"},{line,6162}]},
 {erl_syntax,concrete,1,[{file,"erl_syntax.erl"},{line,6159}]},
 {erl_syntax,concrete_list,1, [{file,"erl_syntax.erl"},{line,6192}]},
 {erl_syntax,concrete_list,1, [{file,"erl_syntax.erl"},{line,6192}]},
 {erl_syntax,concrete,1,[{file,"erl_syntax.erl"},{line,6162}]}]}

== Steps to reproduce ===

* copy the attached test_SUITE.erl into a test folder and put test_SUITE.hrl 
into a sub-folder named "include"
* run any of these two commands:
ct_run -include "include" -suite test_SUITE
CT_INCLUDE_PATH=include ct_run -suite test_SUITE

=> if the .hrl file is put into the test folder, everything is fine though



Nico

_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs
test_SUITE.erl (text/x-erlang, 202 B)
-module(test_SUITE).
-author('[email protected]').

-compile(export_all).

-include("test_SUITE.hrl").

all() -> [test_macro].

-spec test_macro([{atom(), ?RT:key()}]) -> ok.
test_macro(_Config) ->
    ok.
test_SUITE.hrl (text/plain, 23 B)
-define(RT, rt_chord).
signature.asc (application/pgp-signature, 181 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEABECAAYFAlS+VxMACgkQIPJyS9rqnlm5QQCg6esQpD/xjzsV4+wTTVoiArX9
vYoAnjD0ussiqxoz7g5/2TIpQdP1jlhp
=hrL8
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.