The unittests in autopkgtest are run twice
Metadata
Current evaluation
PR #600 removed unit tests from autopkgtest, merging as commit 8a4d204de and shipping in snapcraft 2.12; the SRU was successfully verified.
Resolution: closed resolved
Reason: PR #600 implemented the requested change in commit 8a4d204de. Snapcraft 2.12 was released to -updates after successful verification.
Evaluated by: mr-cal-bot
No scores available.
Issue body
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.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | PR #600 removed unit tests from autopkgtest, merging as commit 8a4d204de and shipping in snapcraft 2.12; the SRU was successfully verified. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged canonical/snapcraft#600 (8a4d204de), removing unit tests from autopkgtest; snapcraft 2.12 passed SRU verification and shipped to xenial-updates. | |
| stealth/space-bunny-alpha | — | closed resolved | Unit tests were removed from autopkgtest in merged canonical/snapcraft#600 (8a4d204de), leaving only integration and snaps suites because package builds already run unit tests. | |
| qwen/qwen3.6-35b-a3b | — | — | Autopkgtest configuration updated to skip unit tests already executed during package builds. Only integration and snaps suites now run, eliminating redundant execution and improving developer build times. Resolved and verified. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved and verified. Autopkgtest configuration was updated to exclude unit tests, running only integration and snaps suites. This eliminates redundant execution during the build phase and reduces developer test times. | |
| qwen/qwen3.6-35b-a3b | — | — | Autopkgtest configuration updated to skip unit tests already executed during package building. Only integration and snaps suites now run in autopkgtest, eliminating duplicate execution and improving build times. Resolved and verified. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
ubuntu-core/snapcraft#600
(confidence 100%)
Merged as commit 8a4d204de with the title "Remove the unittests from the autopkgtest execution".
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1570992 autopkgtests are running snapcraft from source | snapcraft (launchpad) | closed | Fixed by upstream PR #464 (commit bce2d23ec) making autopkgtests run against the installed snapcraft package instead of the source tree. Shipped in snapcraft 2.8.8b xenial SRU; verified and released to -updates. | |
| #600 Remove the unittests from the autopkgtest execution | snapcraft | merged | Merged PR #600 (commit 8a4d204) removed unit tests from the autopkgtest run since they were already executed during the package build, fixing duplicate test runs for LP bug #1596068. | |
| #1541421 Run unittests as part of the integration tests | snapcraft (launchpad) | closed | Unit tests were added to the autopkgtest suite across tested architectures via canonical/snapcraft#293 (merge commit af4d3bbf5, implementation 4057fe797). | |
| #1576998 some unit tests are importing mock | snapcraft (launchpad) | closed | Fixed via ubuntu-core/snapcraft PR #492 (commit 6e3f923d3, "Import mock from unittest.") and PR #494 (16a0eeba7, "Remove missing replacement for unittest.mock"); shipped in snapcraft 2.8.8b SRU, verified and released to xenial -updates. | |
| #293 Add the unit tests to the autopkgtest suite. | snapcraft | merged | Merged as commit 4057fe797 (merge commit af4d3bbf5) by elopio, adding Snapcraft's unit tests to the autopkgtest suite for LP #1541421; approved by @sergiusens. |