patch: common_test include vs. include_lib

Fred Hebert <>
Thu Dec 24 20:29:15 CET 2009


I've changed the 'ct.hrl' include file to call 'include_lib' on
'test_server.hrl' rather than a straight include.
I've also updated the example code in the documentation to use 'include_lib'
rather than a straight 'include' for 'ct.hrl' in order to be constant.

The current standard include is annoying because during compilation you get
errors about files not being found. The only workarounds I found on the web
were to define your own ct.hrl file or to give the include paths to the
compiler. As far as I know, this is because common_test hasn't always been
distributed with the OTP libs and it looks like it stayed the same after
being included (correct me if I'm wrong). This fix should make it work like
any other library include without breaking old code, given the workarounds
should still work now.

branch: http://github.com/ferd/otp/tree/common_test_includes

git fetch git://github.com/ferd/otp.git common_test_includes


More information about the erlang-patches mailing list