diff mbox series

[bug#49183] gnu: ocaml-dose3: Fix tests.

Message ID 4598abb91f7f610e062f34931fe988d04b5d43c1.1624438202.git.public@yoctocell.xyz
State Accepted
Headers show
Series [bug#49183] gnu: ocaml-dose3: Fix tests. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Xinglu Chen June 23, 2021, 8:52 a.m. UTC
* gnu/packages/ocaml.scm (ocaml-dose3)[arguments]<#:phases>: Add phase to
patch tests script.
---
The test script was failing to run without this, which also caused
emacs-tuareg to not build.

No idea why one would use Python to test OCaml code...

 gnu/packages/ocaml.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)


base-commit: 4605ea1a780ff5889b7273d27a255294d7a08327

Comments

pukkamustard June 23, 2021, 11:09 a.m. UTC | #1
Neat. Thanks!

Fixes the test and looks got to me.

> No idea why one would use Python to test OCaml code...
 
Yeah, makes one wonder. At least they've updated to Python3 
(https://gitlab.com/irill/dose3/-/blob/master/CHANGES#L33) 
recently.
Julien Lepiller June 23, 2021, 12:45 p.m. UTC | #2
Le Wed, 23 Jun 2021 11:09:44 +0000,
pukkamustard <pukkamustard@posteo.net> a écrit :

> Neat. Thanks!
> 
> Fixes the test and looks got to me.
> 
> > No idea why one would use Python to test OCaml code...  
>  
> Yeah, makes one wonder. At least they've updated to Python3 
> (https://gitlab.com/irill/dose3/-/blob/master/CHANGES#L33) 
> recently.
> 
> 
> 

Thanks! Pushed as 91b29aa37394b660117e1d79927621db1344b7fe.
diff mbox series

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index dd30f4cc97..1262c0e303 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -647,7 +647,14 @@  underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.")
        #:make-flags
        (list (string-append "LIBDIR="
                             (assoc-ref %outputs "out")
-                            "/lib/ocaml/site-lib"))))
+                            "/lib/ocaml/site-lib"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-test-script
+           (lambda _
+             (substitute* "applications/dose-tests.py"
+               (("warning\\(")
+                "from warnings import warn\nwarn(")))))))
     (propagated-inputs
       `(("ocaml-graph" ,ocaml-graph)
         ("ocaml-cudf" ,ocaml-cudf)