This makes eunit completely optional, useful for supporting downstream builders like CouchDB.
make eunit completely optional.
I don't understand the purpose of this. How is this useful for downstream builders? eunit ships with OTP.
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
That's a stupid thing for them to do, but OK. I guess I will consider supporting bastardized Debian OTP.
Disregard of Debian packaging I personally second that change. Mochiweb should include eunit headers only in case of running unit-tests.
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.
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.
fix mochiweb_cover.erl test in an ugly way.
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.
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.
I recreated a new but equivalent branch from scratch and pushed to master.