Makefile target names

Ryan Beisner ryan.beisner at canonical.com
Wed Jan 21 17:05:24 UTC 2015


Greetings,

I'd like to invite discussion on Makefile target names.  I've seen a few
different takes on Makefile target naming conventions across charms.  For
example, in the OpenStack charms, `make test` runs amulet and `make
unit_test` performs nose tests.  In many/most other charms, `make test`
infers unit/nose testing, and amulet target names can vary.

As I understand bundletester:  it expects `make test` to be unit tests.
Amulet targets in the Makefile aren't processed if they exist.  Instead,
the executables in the test dir are fired off.  And, I think that should
all be quite fine as long as the charm's amulet make target isn't doing
anything important.

The net effect for OpenStack charms at the moment is that when they hit
Juju QA, amulet fires off twice, and unit is not run.  I'd like to make
sure the OpenStack charms are in line with any established Makefile
convention.  Is there a reference or doc for such a convention?

I've seen 'unit_test' and 'functional_test' target names in use as well,
and I quite like those, as they leave no question as to purpose.

To work around the variations we've seen across charms, server team's OSCI
(OpenStack CI charm testing) ignores make target names, and instead parses
the Makefile, looking for the right "thing-to-do," then execs the target
found.  Bear in mind that OSCI isn't intended to be a replacement for
general charm QA, rather it is an intense safety trigger for the OpenStack
charm developers.  We also want these charms to succeed in Juju QA / CI.

Input and advice are much appreciated!

Many thanks,


Ryan Beisner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20150121/08b12d6a/attachment.html>


More information about the Juju mailing list