← Back to issue list

unit tests in IsDirtyTestCase fail when executed in a platform that's not amd64

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1589752
Type
issue
State
closed
Author
~elopio
Labels
verification-done
Created
Updated
Closed

Current evaluation

Fixed by upstream PR ubuntu-core/snapcraft#553 (commit 393c4e201), which made IsDirtyTestCase architecture-agnostic; released in snapcraft 2.11 to xenial -updates, SRU verified.

Resolution: closed resolved

Reason: Commit 393c4e201 "Make the IsDirty unit test case pass in architectures other than amd64. (#553)" fixed the hardcoded amd64 architecture in the test, referenced by elopio in the issue. Janitor and the QA team confirmed the fix landed in snapcraft 2.11, verification-done after a successful SRU to xenial -updates.

Evaluated by: mr-cal-bot

No scores available.

Issue body

The TestCase sets the project options architecture to amd64, so when it is run in a different architecture it will fail. ====================================================================== FAIL: test_build_is_dirty_from_options (snapcraft.tests.test_pluginhandler.IsDirtyTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/adt-run.6GCmWq/build.jQY/real-tree/snapcraft/tests/test_pluginhandler.py", line 1095, in test_build_is_dirty_from_options 'Build step was unexpectedly dirty') AssertionError: True is not false : Build step was unexpectedly dirty ====================================================================== FAIL: test_build_is_dirty_from_project (snapcraft.tests.test_pluginhandler.IsDirtyTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.5/unittest/mock.py", line 1157, in patched return func(*args, **keywargs) File "/tmp/adt-run.6GCmWq/build.jQY/real-tree/snapcraft/tests/test_pluginhandler.py", line 1113, in test_build_is_dirty_from_project 'Build step was unexpectedly dirty') AssertionError: True is not false : Build step was unexpectedly dirty ====================================================================== FAIL: test_pull_is_dirty_from_options (snapcraft.tests.test_pluginhandler.IsDirtyTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/adt-run.6GCmWq/build.jQY/real-tree/snapcraft/tests/test_pluginhandler.py", line 1142, in test_pull_is_dirty_from_options 'Pull step was unexpectedly dirty') AssertionError: True is not false : Pull step was unexpectedly dirty ====================================================================== FAIL: test_pull_is_dirty_from_project (snapcraft.tests.test_pluginhandler.IsDirtyTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.5/unittest/mock.py", line 1157, in patched return func(*args, **keywargs) File "/tmp/adt-run.6GCmWq/build.jQY/real-tree/snapcraft/tests/test_pluginhandler.py", line 1160, in test_pull_is_dirty_from_project 'Pull step was unexpectedly dirty') AssertionError: True is not false : Pull step was unexpectedly dirty [Impact] * No visible impact for users. * Fixing this test will get us closer to have green executions in autopkgtests in all the platforms. [Test Case] * Run the autopkgtests in a platform that's not amd64, [Regression Potential] * This could make fail the tests in amd64. But as it's in an autopkgtest, any regression will block the new version to get to proposed.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by upstream PR ubuntu-core/snapcraft#553 (commit 393c4e201), which made IsDirtyTestCase architecture-agnostic; released in snapcraft 2.11 to xenial -updates, SRU verified.
stealth/space-bunny-alpha — closed resolved Fixed by PR ubuntu-core/snapcraft#553 (commit 393c4e20), making IsDirtyTestCase architecture-independent; released in snapcraft 2.11 and marked verification-done.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #553 (commit 393c4e201), making IsDirty tests architecture-independent; shipped in snapcraft 2.11 and verified on non-amd64 platforms.
stealth/space-bunny-alpha — closed resolved Fixed non-amd64 IsDirtyTestCase failures by removing its hardcoded amd64 setup; merged in canonical/snapcraft#553 as commit 393c4e201.
qwen/qwen3.6-35b-a3b — — Fixed IsDirtyTestCase failures on non-amd64 platforms by removing hardcoded architecture assumptions. The issue was closed after verification, ensuring tests pass across all architectures.
qwen/qwen3.6-35b-a3b — — Resolved by updating IsDirtyTestCase to dynamically detect the host architecture instead of hardcoding amd64, ensuring tests pass across all platforms during autopkgtest execution.
qwen/qwen3.6-35b-a3b — — Resolved architecture-specific failures in IsDirtyTestCase by removing hardcoded amd64 checks. The issue was closed and marked verification-done, enabling successful autopkgtest execution on non-amd64 platforms.

Update history

Date Change
created

Related work

  • Likely Fixed By: ubuntu-core/snapcraft#553 (confidence 95%)

    Upstream PR fixing the test, commit 393c4e201, listed in the snapcraft 2.11 changelog for this LP bug.

  • Related To: ubuntu-core/snapcraft#554 (confidence 60%)

    Companion PR in the same 2.11 SRU enabling snaps tests on multiple architectures.

Related issues

Issue Project State Summary Similarity
#1589747 test_cleanbuild unit test fails when executed in a platform that's not amd64 snapcraft (launchpad) closed Fixed by PR ubuntu-core/snapcraft#552 (commit 65c1fac22), making test_cleanbuild architecture-aware; released in snapcraft 2.11 and verified in xenial -updates.
83%
#1589779 snap tests fail when executed in a platform that's not amd64 snapcraft (launchpad) closed Fixed by ubuntu-core/snapcraft PR #554 (commit baed96749), making snaps tests architecture-aware; released in snapcraft 2.11 after successful verification.
79%
#1643029 unittests are not passing in armhf snapcraft (launchpad) closed Architecture-hardcoded unit tests (pluginhandler IsDirty and commands push) were made arch-agnostic by canonical/snapcraft#945, commit 073332b9b "tests: fix unittests for armhf", closing the armhf autopkgtest failures.
72%
#553 Make the IsDirty unit test case pass in architectures other than amd64. snapcraft merged Merged as commit 393c4e201, dropping the hardcoded architecture from the pluginhandler test setup so the IsDirty test passes on non-amd64. Resolves LP #1589752; part of a series with #552/#554.
71%