← 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 IsDirtyTestCase failures on non-amd64 platforms by removing hardcoded architecture assumptions. The issue was closed after verification, ensuring tests pass across all architectures.

Suggested action:

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
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

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#553 Make the IsDirty unit test case pass in architectures other than amd64. snapcraft merged Merged a change removing architecture-specific setup in the pluginhandler test case, fixing the IsDirty unit test on non-amd64 architectures. Resolves LP: #1589752 and depends on #552.
80%
#1589747 test_cleanbuild unit test fails when executed in a platform that's not amd64 snapcraft (launchpad) closed Fixed test_cleanbuild unit test failure on non-amd64 platforms by replacing the hardcoded amd64 architecture with dynamic detection. Ensures cross-platform compatibility. Resolved and verified.
78%