snapcraft can't run tests as part of building a snap

Bug #1626625 reported by Chad Miller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

It's quite a common pattern in the autoconf world to have the resulting makefile have rules that verify the build against a test suite. There is no way to run those tests right now.

I think it would be nice to have in autoconf and maybe others a way to run tests after build, the failure of which halts packaging.

ideas

  plugin: autoconf
  accept-if:
    - make run-unittests
    - make run-coveragetests

or

  plugin: autoconf
  test-rules: [ run-unittests, run-coveragetests ]

Revision history for this message
Sergio Schvezov (sergiusens) wrote : Re: [Bug 1626625] [NEW] snapcraft can't run tests as part of building a snap

El 22/09/16 a las 12:49, Chad Miller escribió:
> Public bug reported:
>
> It's quite a common pattern in the autoconf world to have the resulting
> makefile have rules that verify the build against a test suite. There is
> no way to run those tests right now.
>
> I think it would be nice to have in autoconf and maybe others a way to
> run tests after build, the failure of which halts packaging.
>
> ideas
>
> plugin: autoconf
> accept-if:
> - make run-unittests
> - make run-coveragetests
>
>
> or
>
> plugin: autoconf
> test-rules: [ run-unittests, run-coveragetests ]
>

Thanks for bringing this back into our radar, we do want to have some
semantics to also have an explicit `snapcraft test` command (discussed
it with Mark a while back).

I am leaning onto `test-targets` and using the latter approach.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.