Make Eunit optional #22

Closed
wants to merge 2 commits into
from

Projects

None yet

4 participants

@rnewson

This makes eunit completely optional, useful for supporting downstream builders like CouchDB.

@etrepum
Mochi Media, Inc. member

I don't understand the purpose of this. How is this useful for downstream builders? eunit ships with OTP.

@rnewson

The Ubuntu/Debian packagers have separated eunit into its own package (erlang-eunit).

Basically, this introduces a new build dependency for couchdb, the original thread discussing the issue is here: http://mail-archives.apache.org/mod_mbox/couchdb-dev/201011.mbox/%3CAANLkTinHaicoN2Qub00mA8q=JnJJB3S1Z-CCPYzuPpDW@mail.gmail.com%3E

@etrepum
Mochi Media, Inc. member

That's a stupid thing for them to do, but OK. I guess I will consider supporting bastardized Debian OTP.

@lemenkov
Mochi Media, Inc. member

Disregard of Debian packaging I personally second that change. Mochiweb should include eunit headers only in case of running unit-tests.

@lemenkov
Mochi Media, Inc. member

Just for the record - I've got two failed tests with this patch applied to the current head. So this change needs another round before merging.

@rnewson

I see two tests failing here also. Curiously, the tests pass if foo_table is moved above the -ifdef clause. I thought the change I've made in run_tests.escript was recompiling everything with -DTEST but I can only explain this test failure if that's not the case (but then I can't explain why all the others run).

New patch once I figure it out.

@dreid
Mochi Media, Inc. member

Commit 550cbed appears to be unnecessary when using rebar to run the tests. I suggest merging master back into your eunit branch and trying that.

@etrepum
Mochi Media, Inc. member

Yes please, if you can rebase this on top of the current master, removing all of the makefile stuff we don't need anymore, then we could get this in soon.

@etrepum
Mochi Media, Inc. member

I recreated a new but equivalent branch from scratch and pushed to master.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment