Unverified Commit fc03d1a0 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

python3Packages.holistic-trace-analysis: fix tests on Darwin (#452716)

parents 20cf8adb d889ccb7
Loading
Loading
Loading
Loading
+31 −4
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,

  # build system
  setuptools,

  # dependencies
  jupyterlab,
  lib,
  numpy,
  pandas,
  plotly,
  pydot,
  pytestCheckHook,
  setuptools,
  torch,

  # tests
  pytestCheckHook,
  writableTmpDirAsHomeHook,
}:

buildPythonPackage rec {
@@ -35,7 +43,26 @@ buildPythonPackage rec {
    torch
  ];

  nativeCheckInputs = [ pytestCheckHook ];
  nativeCheckInputs = [
    pytestCheckHook
    writableTmpDirAsHomeHook
  ];

  disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
    # Permission denied: '/tmp/my_saved_cp_graph/trace_data.csv'
    "test_critical_path_breakdown_and_save_restore"
    # Fails under Python 3.12 on Darwin with I/O errors
    # Permission denied: '/tmp/path_does_not_exist/...'
    "test_critical_path_overlaid_trace"
  ];

  disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
    # Makes assumptions about the filesystem layout
    "tests/test_config.py"
    # EOFError -- makes assumptions about file I/O under Python 3.12
    # https://github.com/facebookresearch/HolisticTraceAnalysis/issues/300
    "tests/test_symbol_table.py"
  ];

  pythonImportsCheck = [ "hta" ];