From 4aa18d9249777f24aee61690e6cf7aa1353b69d1 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Mon, 2 May 2022 13:00:59 +0100 Subject: [PATCH] libarchive: disable cpio file-access-time related tests these are mysteriously flakey on some peoples darwin systems, which could be the result of stray accesses or timezone issues --- .../libraries/libarchive/default.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/libarchive/default.nix b/pkgs/development/libraries/libarchive/default.nix index 76e5a32316d..066ea8b60dd 100644 --- a/pkgs/development/libraries/libarchive/default.nix +++ b/pkgs/development/libraries/libarchive/default.nix @@ -40,18 +40,21 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace Makefile.am --replace '/bin/pwd' "$(type -P pwd)" - declare -a skip_tests=( + declare -a skip_test_paths=( # test won't work in nix sandbox - 'test_write_disk_perms' + 'libarchive/test/test_write_disk_perms.c' # can't be sure builder will have sparse-capable fs - 'test_sparse_basic' + 'libarchive/test/test_sparse_basic.c' # can't even be sure builder will have hardlink-capable fs - 'test_write_disk_hardlink' + 'libarchive/test/test_write_disk_hardlink.c' + # access-time-related tests flakey on some systems + 'cpio/test/test_option_a.c' + 'cpio/test/test_option_t.c' ) - for test_name in "''${skip_tests[@]}" ; do - sed -i "/$test_name/d" Makefile.am - rm "libarchive/test/$test_name.c" + for test_path in "''${skip_test_paths[@]}" ; do + substituteInPlace Makefile.am --replace "$test_path" "" + rm "$test_path" done '';