The unittests in autopkgtest are run twice

Bug #1596068 reported by Leo Arias on 2016-06-24
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Medium
Leo Arias

Bug Description

By the time autopkgtests are run, the package has already been built. In order to build the package, the unittests are executed. So by running them in autopkgtest, we are duplicating the work.

In addition to that, autopkgtest is intended to run as installed. The unit tests are white box importing the source modules.

We have to run only integration and snaps suites in autopkgtest.

[Impact]

 * For users, none.

 * For developers, faster execution times because unit tests are run only once.

[Test Case]

 * N/A

[Regression Potential]

 * None.

Leo Arias (elopio) wrote :
Changed in snapcraft:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Leo Arias (elopio)
milestone: none → 2.12
Changed in snapcraft:
status: In Progress → Fix Committed
Steve Langasek (vorlon) wrote :

The explanation given in this bug is incorrect. The unit tests will be run at package build time, yes; but we *also* want them run as part of the autopkgtests, because the autopkgtests not only run as part of the SRU of this package, they also run whenever a *dependency* of this package gets updated (either in SRU or in the development series). Having strong autopkgtests is important to protect against regressions /between/ packages, not just regressions /within/ packages.

The reduction in tests strictly speaking does not impact the SRU of this package itself, so I am not considering this a blocker for updating snapcraft to 2.12 under the SRU exception policy. However, I strongly disagree with this change and would like to see it reverted in the next update.

Hello Leo, or anyone else affected,

Accepted snapcraft into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/snapcraft/2.12 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Leo Arias (elopio) wrote :

We can get back the unit tests, if you feel strongly about it. However we have an integration suite, and it's purpose is to exercise snapcraft and all its dependencies. IMO, if we fail to catch a regression in one of the depenencies, that means that we are missing an integration test, not a unit test.

But as I said, I'm ok with reverthing the change. It doesn't hurt to be on the safe side.

For now, I'm going to mark this as verified, as there's nothing to check in xenial-proposed. And I'm waiting for your reply to make the change.

Thanks Steve!

tags: added: verification-donee
removed: verification-needed
tags: added: verification-done
removed: verification-donee
Changed in snapcraft:
status: Fix Committed → Fix Released

The verification of the Stable Release Update for snapcraft has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

no longer affects: Ubuntu Xenial
no longer affects: Ubuntu Yakkety
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers