mirage / alcotest

A lightweight and colourful test framework
ISC License
456 stars 80 forks source link

Add jsoo support, configure CI #326

Closed hhugo closed 3 years ago

hhugo commented 3 years ago
hhugo commented 3 years ago

I think I'm done with this PR. CI is happy on my repo. Appveyor is complaining because I've removed its config file (I suspect you need to go to setting to fully remove it)

hhugo commented 3 years ago

The macos CI is a bit flaky, cc @smorimoto

samoht commented 3 years ago

I've just removed the appveyor integration

smorimoto commented 3 years ago

I think it will be stabilized by removing the dune cache field to disabling it. The dune 2's cache is quite unstable except on Linux, and you may not want to use it too aggressively until dune 3 is released...

hhugo commented 3 years ago

Another small papercut: the node Alcotest output (on my terminal at least) contains some extra trailing dots after each test case:

This was caused by a bug in the javascript stubs. I've pushed a fix.

hhugo commented 3 years ago

I'm surprised by that, since man node is fairly clear that -- isn't passed to the script. Is this Cmdliner behaving weirdly?

What you want is

$ node -- _build/default/examples/floats.bc.js --compact
Testing `Float tests'.
This run has ID `IGDG6PKU'.

...
hhugo commented 3 years ago

Can someone approve the workflows to test the CI one more time ?

samoht commented 3 years ago

Seems to be all green now!

hhugo commented 3 years ago

one last approval for the CI ? @samoht ? @CraigFe ?

craigfe commented 3 years ago

Now that we're not pin-depending on jsoo, we'll need some way to express a dependency on 3.11 (the Windows CI picked up 3.10 and is failing with it). Is there a way to do this without making Jsoo a hard dependency / breaking switches that were previously using pre-3.11?

edit: perhaps we need an alcotest-js virtual package that just specifies a dependency on the right version of js_of_ocaml?

samoht commented 3 years ago

Seems broken on windows?

-Testing `test/e2e/alcotest/passing/verbose_newlines.ml'.
-This run has ID `<uuid>'.
+D:\a\alcotest\alcotest\_build\default\test\e2e\alcotest\passing\verbose_newlines.<ext>: 

+internal error, uncaught exception:

+Failure("win_filedescr_of_channel not implemented")
hhugo commented 3 years ago

@smorimoto, any idea why an older version of jsoo would be picked up in the Window CI ?

hhugo commented 3 years ago

One need to update the window opam repo. https://github.com/fdopen/opam-repository-mingw/tree/opam2/packages/js_of_ocaml-compiler

Should ocaml-setup start using the official opam-repository on windows ?

smorimoto commented 3 years ago

We have plans to do it this year, but we are not ready yet. I'm also a maintainer of the Windows repository, so if you could open a PR for 3.11 there I can check and merge it.

smorimoto commented 3 years ago

Now 3.11 is available on Windows!

hhugo commented 3 years ago

Windows in now happy again

craigfe commented 3 years ago

Thanks @hhugo and @smorimoto for this excellent contribution. Merging now.

I intend to cut a release containing these changes by the end of the day.