[PATCH core-updates] gnu: ocaml-ppxlib: Fix tests.

  • Done
  • quality assurance status badge
Details
2 participants
  • Julien Lepiller
  • Simon Tournier
Owner
unassigned
Submitted by
Simon Tournier
Severity
normal
S
S
Simon Tournier wrote on 12 Apr 2023 18:00
(address . guix-patches@gnu.org)(name . Simon Tournier)(address . zimon.toutoune@gmail.com)
20230412160010.3232633-1-zimon.toutoune@gmail.com
* gnu/packages/ocaml.scm (ocaml-ppxlib)[arguments]: Substitue obsolete 'egrep'
by 'grep -E'.
---
gnu/packages/ocaml.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Hi,

This fixes a regression when updating grep.


Cheers,
simon


Toggle diff (22 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c6dca2874f..f1c4e35044 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6660,7 +6660,12 @@ (define-public ocaml-ppxlib
(substitute* "test/ppx_import_support/test.ml"
(("\\(Failure") "Failure")
((" \"(Some ppx-es.*)\")" _ m)
- (string-append " \"" m "\"."))))))))
+ (string-append " \"" m "\".")))))
+ (add-after 'fix-test-format 'fix-egrep
+ (lambda _
+ ;; egrep is obsolescent; using grep -E
+ (substitute* "test/expansion_context/run.t"
+ (("egrep") "grep -E")))))))
(propagated-inputs
(list ocaml-compiler-libs
ocaml-ppx-derivers

base-commit: a3bfb867380f1e5ce157334d7d9877297ef509ab
--
2.38.1
S
S
Simon Tournier wrote on 12 Apr 2023 19:09
[PATCH core-updates v2 1/2] gnu: ocaml-ppxlib: Fix tests.
(address . 62796@debbugs.gnu.org)(name . Simon Tournier)(address . zimon.toutoune@gmail.com)
20230412170940.3333419-1-zimon.toutoune@gmail.com
* gnu/packages/ocaml.scm (ocaml-ppxlib)[arguments]: Substitue obsolete 'egrep'
by 'grep -E'.
---
gnu/packages/ocaml.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c6dca2874f..f1c4e35044 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6660,7 +6660,12 @@ (define-public ocaml-ppxlib
(substitute* "test/ppx_import_support/test.ml"
(("\\(Failure") "Failure")
((" \"(Some ppx-es.*)\")" _ m)
- (string-append " \"" m "\"."))))))))
+ (string-append " \"" m "\".")))))
+ (add-after 'fix-test-format 'fix-egrep
+ (lambda _
+ ;; egrep is obsolescent; using grep -E
+ (substitute* "test/expansion_context/run.t"
+ (("egrep") "grep -E")))))))
(propagated-inputs
(list ocaml-compiler-libs
ocaml-ppx-derivers

base-commit: a3bfb867380f1e5ce157334d7d9877297ef509ab
--
2.38.1
S
S
Simon Tournier wrote on 12 Apr 2023 19:09
[PATCH core-updates v2 2/2] gnu: ocaml-mdx: Fix tests.
(address . 62796@debbugs.gnu.org)(name . Simon Tournier)(address . zimon.toutoune@gmail.com)
20230412170940.3333419-2-zimon.toutoune@gmail.com
* gnu/packages/ocaml.scm (ocaml-mdx)[arguments]: Substitue obsolete 'egrep' by
'grep -E'.
---
gnu/packages/ocaml.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f1c4e35044..b462d315e1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -9230,7 +9230,12 @@ (define-public ocaml-mdx
"test/bin/mdx-test/misc/no-such-prelude/test.expected")
(("`") "'")
(("COMMAND") "[COMMAND]")
- (("\\.\\.\\.") "…")))))))
+ (("\\.\\.\\.") "…"))))
+ (add-after 'fix-test-format 'fix-egrep
+ (lambda _
+ ;; egrep is obsolescent; using grep -E
+ (substitute* "test/bin/mdx-test/expect/padding/test-case.md"
+ (("egrep") "grep -E")))))))
(propagated-inputs
(list ocaml-fmt
ocaml-astring
--
2.38.1
S
S
Simon Tournier wrote on 12 Apr 2023 19:08
Re: bug#62796: [PATCH core-updates] gnu: ocaml-ppxlib: Fix tests.
(address . 62796@debbugs.gnu.org)
87a5zdgh9u.fsf@gmail.com
Hi,

On mer., 12 avril 2023 at 18:00, Simon Tournier <zimon.toutoune@gmail.com> wrote:

Toggle quote (2 lines)
> This fixes a regression when updating grep.

The other affected package is ocaml-mdx, fixed by [PATCH v2] send to
patch#62796.

Considering these 2 patches, the OCaml packages in core-updates build
fine. Except ocaml-uring with the error:

Toggle snippet (5 lines)
# let `Timeout, timeout = consume t;;
-val timeout : int = -62
+val timeout : int = -22

Well, the errno -62 is expected and corresponds to -ETIME from Linux
kernel documentation. All documented in tests/main.md of the package
ocaml-uring,

Toggle snippet (12 lines)
## Timeout

Timeout should return (-ETIME). This is defined in https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/errno.h#L45

```ocaml

[...]

# let `Timeout, timeout = consume t;;
val timeout : int = -62

And I do not understand why this -22 (EINVAL Invalid argument). Any
idea?


Cheers,
simon
J
J
Julien Lepiller wrote on 12 Apr 2023 21:54
Re: [bug#62796] [PATCH core-updates v2 2/2] gnu: ocaml-mdx: Fix tests.
(name . Simon Tournier)(address . zimon.toutoune@gmail.com)(address . 62796-done@debbugs.gnu.org)
20230412215418.616ccc58@sybil.lepiller.eu
Pushed to core-updates as 8557eb9ffb909d5df8aba5ca1c444f23f083d7e9 and
a957171bc41e98e29674f99cf3dd2940ff45a0d3, thanks!
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 62796@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 62796
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch