From 752deb82fd0bf408ff624b1642c541fe3b3022ea Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Mon, 16 Jun 2025 09:17:23 +0100 Subject: [PATCH] python3Packages.craft-application: disable x86_64 specific tests on aarch64 --- pkgs/by-name/ch/charmcraft/package.nix | 12 ++++++++++++ .../craft-application/default.nix | 17 +++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/ch/charmcraft/package.nix b/pkgs/by-name/ch/charmcraft/package.nix index a91da79c447c..6f5707243d6f 100644 --- a/pkgs/by-name/ch/charmcraft/package.nix +++ b/pkgs/by-name/ch/charmcraft/package.nix @@ -7,6 +7,7 @@ cacert, versionCheckHook, writableTmpDirAsHomeHook, + stdenv, }: let version = "4.10.0"; @@ -26,6 +27,17 @@ let substituteInPlace pyproject.toml --replace-fail "setuptools==75.8.0" "setuptools" substituteInPlace craft_application/git/_git_repo.py --replace-fail "/snap/core22/current/etc/ssl/certs" "${cacert}/etc/ssl/certs" ''; + + disabledTestPaths = [ + # These tests assert outputs of commands that assume Ubuntu-related output. + "tests/unit/services/test_lifecycle.py" + ]; + + disabledTests = + old.disabledTests + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ + "test_process_grammar_full" + ]; }); }; }; diff --git a/pkgs/development/python-modules/craft-application/default.nix b/pkgs/development/python-modules/craft-application/default.nix index 8951c8982519..ec71f3dd4b4c 100644 --- a/pkgs/development/python-modules/craft-application/default.nix +++ b/pkgs/development/python-modules/craft-application/default.nix @@ -127,12 +127,21 @@ buildPythonPackage rec { "test_process_grammar_build_for" "test_process_grammar_platform" "test_process_grammar_default" + "test_create_craft_manifest" + "test_create_project_manifest" + "test_from_packed_artifact" + "test_teardown_session_create_manifest" ]; - disabledTestPaths = [ - # These tests assert outputs of commands that assume Ubuntu-related output. - "tests/unit/services/test_lifecycle.py" - ]; + disabledTestPaths = + [ + # These tests assert outputs of commands that assume Ubuntu-related output. + "tests/unit/services/test_lifecycle.py" + ] + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ + # Hard-coded assumptions around use of "amd64" arch strings. + "tests/unit/services/test_project.py" + ]; passthru.updateScript = nix-update-script { };