Unverified Commit 82034aea authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

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

parents 69f2e078 1c68b1bb
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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"
  ];

+19 −0
Original line number Diff line number Diff line
@@ -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 = [