python313Packages.libbs: add binaries for tests (#446629)

This commit is contained in:
Fabian Affolter
2025-09-27 15:49:15 +00:00
committed by GitHub
2 changed files with 22 additions and 1 deletions
@@ -14,6 +14,7 @@
sortedcontainers,
toml,
tqdm,
wordfreq,
}:
buildPythonPackage rec {
@@ -39,6 +40,7 @@ buildPythonPackage rec {
sortedcontainers
toml
tqdm
wordfreq
];
optional-dependencies = {
@@ -52,7 +54,7 @@ buildPythonPackage rec {
];
disabledTestPaths = [
# Test tries to import angrmanagement
# Test tries to import angr-management
"tests/test_angr_gui.py"
];
@@ -7,6 +7,7 @@
jfx-bridge,
networkx,
platformdirs,
ply,
prompt-toolkit,
psutil,
pycparser,
@@ -18,6 +19,15 @@
writableTmpDirAsHomeHook,
}:
let
# Binary files from https://github.com/binsync/bs-artifacts (only used for testing and only here)
binaries = fetchFromGitHub {
owner = "binsync";
repo = "bs-artifacts";
rev = "514c2d6ef1875435c9d137bb5d99b6fc74063817";
hash = "sha256-P7+BTJgdC9W8cC/7xQduFYllF+0ds1dSlm59/BFvZ2g=";
};
in
buildPythonPackage rec {
pname = "libbs";
version = "2.15.4";
@@ -38,6 +48,7 @@ buildPythonPackage rec {
jfx-bridge
networkx
platformdirs
ply
prompt-toolkit
psutil
pycparser
@@ -51,6 +62,14 @@ buildPythonPackage rec {
writableTmpDirAsHomeHook
];
# Place test binaries in place
preCheck = ''
export HOME=$TMPDIR
mkdir -p $HOME/bs-artifacts/binaries
cp -r ${binaries} $HOME/bs-artifacts/binaries
export TEST_BINARIES_DIR=$HOME/bs-artifacts/binaries
'';
pythonImportsCheck = [ "libbs" ];
disabledTests = [