Unverified Commit c5490667 authored by Jörg Thalheim's avatar Jörg Thalheim Committed by GitHub
Browse files

xcp: fix build on darwin (#418144)

parents bd29278c 257439de
Loading
Loading
Loading
Loading
+25 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
  acl,
  nix-update-script,
  installShellFiles,
  stdenv,
}:

rustPlatform.buildRustPackage (finalAttrs: {
@@ -22,7 +23,7 @@ rustPlatform.buildRustPackage (finalAttrs: {

  nativeBuildInputs = [ installShellFiles ];

  checkInputs = [ acl ];
  checkInputs = lib.optionals stdenv.isLinux [ acl ];

  # disable tests depending on special filesystem features
  checkNoDefaultFeatures = true;
@@ -35,6 +36,29 @@ rustPlatform.buildRustPackage (finalAttrs: {
    "test_no_perms"
  ];

  # had concurrency issues on 64 cores, also tests are quite fast compared to build
  dontUseCargoParallelTests = true;
  checkFlags = lib.optionals stdenv.isDarwin [
    # ---- test_socket_file::test_with_parallel_file_driver stdout ----
    # STDOUT: 12:20:56 [WARN] Socket copy not supported by this OS: /private/tmp/nix-build-xcp-0.24.1.drv-0/source/targ>
    #
    # STDERR:
    #
    # thread 'test_socket_file::test_with_parallel_file_driver' panicked at tests/common.rs:1149:5:
    # assertion failed: to.exists()
    # note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    "--skip=test_socket_file::test_with_parallel_file_driver"

    # ---- test_sockets_dir::test_with_parallel_file_driver stdout ----
    # STDOUT: 12:20:56 [WARN] Socket copy not supported by this OS: /private/tmp/nix-build-xcp-0.24.1.drv-0/source/targ>
    #
    # STDERR:
    #
    # thread 'test_sockets_dir::test_with_parallel_file_driver' panicked at tests/common.rs:1178:5:
    # assertion failed: to.exists()
    "--skip=test_sockets_dir::test_with_parallel_file_driver"
  ];

  postInstall = ''
    installShellCompletion --cmd xcp \
      --bash completions/xcp.bash \