Marco, I like your proposal with one change - we don't need the test.yaml
changes. Instead I would suggest we add 'unit-test' to the list of default
bundletester targets. So bundletester will run proof, lint, test, and
unit-test (charm author should choose test or unit-test, not both).
Bundletester will *not* run functional-test, since it runs everything +x in
the tests/ dir, which almost always overlaps with functional-test.

On Thu, Jan 22, 2015 at 11:57 AM, Marco Ceppi <ma...@ondina.co> wrote:

> We can also add Makefile checking to charm proof, for an even greater
> redundancy.
>
> To avoid multiple invocations of charm proof (not terrible, IMO) lint
> could be broken down further:
>
> lint: proof code_lint
>
> proof:
>     charm proof
>
> code_lint:
>     # Your code here
>
> Then have bundle tester sniff out code_lint, or use the test.yaml
> configuration to point lint to code_lint. Doesn't change UX for the
> author/contributor but does add a level of complexity. It seems like
> Makefile's are the overwhelming method for consolidating tasks for charms,
> I'd like to kick off the following proposal for Makefile format to be
> placed in charm create templates:
>
> ```
> test: lint unit-test functional-test
> lint: proof code-lint
> sync: charm-helpers-sync
>
> code-lint:
>     # FILL IN COMMANDS FOR PERFORMING CODE LINT
>
> unit-test:
>    # COMMANDS REQUIRED TO UNIT TEST
>
> charm-helpers-sync:
>     @scripts/sync.py ....
>
> functional-test:
>     juju test
>
> proof:
>     charm proof
> ```
>
> With a test.yml file that contained the following:
>
> ```
> makefile:
>     - code-lint
>     - unit-test
> ```
>
> And where applicable, add a .venv target for python charms and recommend
> the use of having charm deps modeled in requirements.txt and pip installed
> to that virtualenv.
>
> Opinions, additions, concerns?
>
> On Thu Jan 22 2015 at 11:41:56 AM Wes Mason <wesley.ma...@canonical.com>
> wrote:
>
>> On 22 January 2015 at 16:36, Simon Davy <bloodearn...@gmail.com> wrote:
>>
>>>  On 22 January 2015 at 16:29, David Britton <david.brit...@canonical.com>
>>> wrote:
>>> > On Thu, Jan 22, 2015 at 04:17:26PM +0000, Simon Davy wrote:
>>> >> On 22 January 2015 at 15:13, David Britton <
>>> david.brit...@canonical.com> wrote:
>>> >> >
>>> >> > lint:
>>> >> >  - make lint
>>> >> >
>>> >>
>>> >> Could we also make[1] the charm linter lint the makefile for the
>>> >> presence of targets agreed in the outcome of this thread?
>>> >
>>> > "charm proof"
>>> >
>>> > I like it.  (bundle tester already runs this)
>>>
>>> Which is interesting, as my lint targets general runs charm proof too,
>>> so it'd be run twice in that case?
>>>
>>> Not a big issue, but if the charm store/review queue is automatically
>>> charm-proofing too, perhaps the make lint target should not be?
>>>
>>> --
>>> Simon
>>>
>>>
>> Whelp it's still nice to have as part of lint when developing the charm,
>> and charm-proof isn't exactly the slowest process to run multiple times.
>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/
>> mailman/listinfo/juju
>>
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju

Reply via email to