From 81797521afa774fb934c15ebdf31fb3cf3e3c47e Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 4 Nov 2021 06:50:02 +0100 Subject: [PATCH] ocamlPackages.merlin: fix tests on darwin --- pkgs/development/tools/ocaml/merlin/4.x.nix | 3 +++ .../development/tools/ocaml/merlin/test.patch | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/development/tools/ocaml/merlin/test.patch diff --git a/pkgs/development/tools/ocaml/merlin/4.x.nix b/pkgs/development/tools/ocaml/merlin/4.x.nix index eda2bb4960c6..5554ce163502 100644 --- a/pkgs/development/tools/ocaml/merlin/4.x.nix +++ b/pkgs/development/tools/ocaml/merlin/4.x.nix @@ -47,6 +47,9 @@ buildDunePackage { dot_merlin_reader = "${dot-merlin-reader}/bin/dot-merlin-reader"; dune = "${dune_2}/bin/dune"; }) + # This fixes the test-suite on macOS + # See https://github.com/ocaml/merlin/pull/1399 + ./test.patch ]; useDune2 = true; diff --git a/pkgs/development/tools/ocaml/merlin/test.patch b/pkgs/development/tools/ocaml/merlin/test.patch new file mode 100644 index 000000000000..0101e825b967 --- /dev/null +++ b/pkgs/development/tools/ocaml/merlin/test.patch @@ -0,0 +1,19 @@ +commit 282eed37f39ff216add8d53766fd59f3737eb87f +Author: Vincent Laporte +Date: Thu Nov 4 06:24:07 2021 +0100 + + Ignore dune stderr in tests + +diff --git a/tests/test-dirs/document/src-documentation.t/run.t b/tests/test-dirs/document/src-documentation.t/run.t +index 2c9e1419..4f4c4327 100644 +--- a/tests/test-dirs/document/src-documentation.t/run.t ++++ b/tests/test-dirs/document/src-documentation.t/run.t +@@ -42,7 +42,7 @@ documentation for the non-last defined value (in the same file) is show + > jq '.value' + " List reversal. " + +- $ dune build --root=. ./doc.exe ++ $ dune build --root=. ./doc.exe 2> /dev/null + $ cat >.merlin < B _build/default/.doc.eobjs/byte + > S .