[erlang-questions] How to integrate common_test into a continuous integration system?

13 views
Skip to first unread message

Eric Merritt

unread,
May 8, 2012, 12:37:38 PM5/8/12
to Erlang Questions
Guys,

I am working on R14B03 (hopefully that will change soon) and trying
to transition to Common Test. One issue that I have run into is that
ct_run does not return a non-zero exit status on failure. That makes
it pretty hard to trivially integrate into a continuous integration
environment. I can create a wrapper around ct that would do what I
need. However, I am pretty sure I am not the only one that has tried
to integrate common test into make/ci. So, I would love to hear how
you guys go about it.

Thanks,
Eric
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Gianfranco Alongi

unread,
May 8, 2012, 2:53:34 PM5/8/12
to Eric Merritt, Erlang Questions
Maybe not what you want exactly, but this question was brought up once
on Stackoverflow

http://stackoverflow.com/questions/6215166/continuous-integration-server-for-erlang-code

I think the easiest way if you won't use Lukas wrapper
https://github.com/garazdawi/cth_tools/blob/master/src/cth_junit.erl
is to roll your own.

/G

Eric Merritt

unread,
May 8, 2012, 3:07:24 PM5/8/12
to Gianfranco Alongi, Erlang Questions
Gianfranco,

Thanks for the response. I was literally getting ready to write
something very similar to cth_tools myself. Now I can take that and
add to it instead. That's very nice.

Eric

Eric Merritt

unread,
May 8, 2012, 9:45:06 PM5/8/12
to Gianfranco Alongi, Erlang Questions
For future posterity. This is how I solved this problem.

ct_run -dir tests ... | awk "/FAILED/{exit 1;}"

This should work in most cases.

Just a note. The documentation for ct:run_test is wrong at least for
R14B04. It *always* returns ok regardless of what the result of the
tests are.

Thank,
Eric
Reply all
Reply to author
Forward
0 new messages