From ca527e93f4ad602b4297ddbf0cab6dfd79c4f098 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Thu, 10 Aug 2023 09:45:11 -0700 Subject: [PATCH] python3.pkgs.angrcli: disable x86 tests on non-x86 architectures --- .../python-modules/angrcli/default.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/angrcli/default.nix b/pkgs/development/python-modules/angrcli/default.nix index 157e1e91341d..368ea4c9a27e 100644 --- a/pkgs/development/python-modules/angrcli/default.nix +++ b/pkgs/development/python-modules/angrcli/default.nix @@ -24,6 +24,11 @@ buildPythonPackage rec { hash = "sha256-a5ajUBQwt3xUNkeSOeGOAFf47wd4UVk+LcuAHGqbq4s="; }; + postPatch = '' + substituteInPlace tests/test_derefs.py \ + --replace "/bin/ls" "${coreutils}/bin/ls" + ''; + propagatedBuildInputs = [ angr cmd2 @@ -35,17 +40,18 @@ buildPythonPackage rec { pytestCheckHook ]; - postPatch = '' - substituteInPlace tests/test_derefs.py \ - --replace "/bin/ls" "${coreutils}/bin/ls" - ''; + disabledTests = lib.optionals (!stdenv.hostPlatform.isx86) [ + # expects the x86 register "rax" to exist + "test_cc" + "test_loop" + "test_max_depth" + ]; pythonImportsCheck = [ "angrcli" ]; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); description = "Python modules to allow easier interactive use of angr"; homepage = "https://github.com/fmagin/angr-cli"; license = with licenses; [ mit ];