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

Eric Merritt <>
Wed May 9 03:45:06 CEST 2012


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


On Tue, May 8, 2012 at 2:07 PM, Eric Merritt <> wrote:
> 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
>
> On Tue, May 8, 2012 at 1:53 PM, Gianfranco Alongi
> <> wrote:
>> 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
>>
>> On Tue, May 8, 2012 at 6:37 PM, Eric Merritt <> wrote:
>>> 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
>>> 
>>> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list