From 912531f664518f12da64f0a3c55a827d363c8a93 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 5 Sep 2024 13:02:01 +0100 Subject: [PATCH] edencommon: patch to increase test discovery timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some reason, this build is incredibly flaky on `x86_64-darwin`, possibly because of the recent `staging-next` merge, failing with a test discovery timeout error both on Hydra and locally. The default discovery timeout is apparently 5 seconds, so let’s try giving it 5 times as long and see if that helps. --- .../libraries/edencommon/default.nix | 5 +++++ .../increase-test-discovery-timeout.patch | 20 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/development/libraries/edencommon/increase-test-discovery-timeout.patch diff --git a/pkgs/development/libraries/edencommon/default.nix b/pkgs/development/libraries/edencommon/default.nix index 97406f81c47a..fa10344826af 100644 --- a/pkgs/development/libraries/edencommon/default.nix +++ b/pkgs/development/libraries/edencommon/default.nix @@ -20,6 +20,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-1z4QicS98juv4bUEbHBkCjVJHEhnoJyLYp4zMHmDbMg="; }; + patches = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + # Test discovery timeout is bizarrely flaky on `x86_64-darwin` + ./increase-test-discovery-timeout.patch + ]; + nativeBuildInputs = [ cmake ]; cmakeFlags = lib.optionals stdenv.isDarwin [ diff --git a/pkgs/development/libraries/edencommon/increase-test-discovery-timeout.patch b/pkgs/development/libraries/edencommon/increase-test-discovery-timeout.patch new file mode 100644 index 000000000000..a79efe36d2e4 --- /dev/null +++ b/pkgs/development/libraries/edencommon/increase-test-discovery-timeout.patch @@ -0,0 +1,20 @@ +diff --git a/eden/common/os/test/CMakeLists.txt b/eden/common/os/test/CMakeLists.txt +index a9f71443f8..be1423c455 100644 +--- a/eden/common/os/test/CMakeLists.txt ++++ b/eden/common/os/test/CMakeLists.txt +@@ -18,4 +18,4 @@ + ${LIBGMOCK_LIBRARIES} + ) + +-gtest_discover_tests(os_test) ++gtest_discover_tests(os_test DISCOVERY_TIMEOUT 25) +diff --git a/eden/common/utils/test/CMakeLists.txt b/eden/common/utils/test/CMakeLists.txt +index 0cac73e569..ff08ecccb8 100644 +--- a/eden/common/utils/test/CMakeLists.txt ++++ b/eden/common/utils/test/CMakeLists.txt +@@ -34,4 +34,4 @@ + ${LIBGMOCK_LIBRARIES} + ) + +-gtest_discover_tests(utils_test) ++gtest_discover_tests(utils_test DISCOVERY_TIMEOUT 25)