Merge pull request #307337 from SuperSandro2000/diffoscope-tlsh

diffoscope: disable radare2 to fix tests
This commit is contained in:
éclairevoyant 2024-04-30 02:50:47 +00:00 committed by GitHub
commit 3e67815f4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,7 +59,6 @@
, python3
, qemu
, R
, radare2
, sng
, sqlite
, squashfsTools
@ -76,8 +75,26 @@
, writeScript
}:
let
python = python3.override {
packageOverrides = final: prev: {
# version 4 or newer would log the followng error but tests currently don't fail because radare2 is disabled
# ValueError: argument TNULL is not a TLSH hex string
tlsh = prev.tlsh.overridePythonAttrs ({ src, ... }: let
version = "3.19.1";
in {
inherit version;
src = src.override {
rev = version;
hash = "sha256-ZYEjT/yShfA4+zpbGOtaFOx1nSSOWPtMvskPhHv3c9U=";
};
});
};
};
in
# Note: when upgrading this package, please run the list-missing-tools.sh script as described below!
python3.pkgs.buildPythonApplication rec {
python.pkgs.buildPythonApplication rec {
pname = "diffoscope";
version = "265";
@ -124,6 +141,11 @@ python3.pkgs.buildPythonApplication rec {
# docx2txt <- makes tests broken:
# > FAILED tests/comparators/test_docx.py::test_diff - IndexError: list index out of range
# > FAILED tests/comparators/test_docx.py::test_compare_non_existing - AssertionError
# radare2
# > FAILED tests/comparators/test_elf_decompiler.py::test_ghidra_diff - IndexError: list index out of range
# > FAILED tests/comparators/test_elf_decompiler.py::test_radare2_diff - AssertionError
# > FAILED tests/comparators/test_macho_decompiler.py::test_ghidra_diff - assert 0 == 1
# > FAILED tests/comparators/test_macho_decompiler.py::test_radare2_diff - AssertionError
#
# We filter automatically all packages for the host platform (some dependencies are not supported on Darwin, aarch64, etc.).
pythonPath = lib.filter (lib.meta.availableOn stdenv.hostPlatform) ([
@ -160,7 +182,7 @@ python3.pkgs.buildPythonApplication rec {
zip
zstd
]
++ (with python3.pkgs; [
++ (with python.pkgs; [
argcomplete
debian
defusedxml
@ -203,13 +225,12 @@ python3.pkgs.buildPythonApplication rec {
procyon
qemu
R
radare2
tcpdump
ubootTools
wabt
xmlbeans
]
++ (with python3.pkgs; [
++ (with python.pkgs; [
androguard
binwalk
guestfs
@ -224,7 +245,7 @@ python3.pkgs.buildPythonApplication rec {
++ lib.optionals (stdenv.hostPlatform.system != "aarch64-darwin") [ gnumeric ]
));
nativeCheckInputs = with python3.pkgs; [
nativeCheckInputs = with python.pkgs; [
pytestCheckHook
] ++ pythonPath;