Skip to content

Conversation

lubegasimon
Copy link
Collaborator

@lubegasimon lubegasimon commented Apr 20, 2021

This PR is intended to fix #651.

Todo:

  • Currently (in this PR), to generate the output files, one has to run the test command three times. The first one for generating link.dune.inc.gen and promoting it to link.dune.inc, the second for generating <html&latex&man>.dune.inc.gen, and promoting them to <html&latex&man>.dune.inc, and the third for generating and promoting output files (latex, html, and man-pages). In that sense, it makes more sense to wrap the series of test command under one command

@lubegasimon lubegasimon requested a review from Julow April 20, 2021 03:24
@lubegasimon lubegasimon force-pushed the improve-generator-tests branch 2 times, most recently from e5edd94 to 7f77d4d Compare April 21, 2021 09:50
@lubegasimon lubegasimon force-pushed the improve-generator-tests branch from 1b5736b to 85cbdfc Compare April 26, 2021 19:39
@lubegasimon lubegasimon marked this pull request as ready for review April 26, 2021 19:40
@lubegasimon lubegasimon force-pushed the improve-generator-tests branch 2 times, most recently from e9063eb to 49ead72 Compare May 7, 2021 19:29
Copy link
Collaborator

@Julow Julow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good !

Latex tests are very noisy because of a debug print that should be removed:

diff --git a/src/latex/generator.ml b/src/latex/generator.ml
index 3abb962e..9626b055 100644
--- a/src/latex/generator.ml
+++ b/src/latex/generator.ml
@@ -62,7 +62,6 @@ module Link = struct
   let filename url =
     let dir = dir url in
     let file = file url in
-    Format.eprintf "dir=%a file=%s\n%!" Fpath.pp dir file;
     if file = "" then Fpath.add_ext "tex" dir
     else Fpath.(add_ext "tex" (dir / file))
 end

@Julow
Copy link
Collaborator

Julow commented May 11, 2021

  • test/generators/cases/ocamlary.mli is a copy of src/ocamlary/ocamlary.mli, I suggest making it a symlink instead (ln -sf ../../../ocamlary/ocamlary.mli test/generators/cases/ocamlary.mli)

  • Bugs_pre_410 shouldn't run on OCaml < 4.10, that's what is causing the CI failures.
    It needs (enabled_if (>= %{ocaml_version} 4.10.0)) on the corresponding "alias runtest, action diff" rule (the other rules doesn't need to change).
    It's fine if this is hard-coded into Gen_backend, we might need more of these in the future:

    val case_enabled_if : Fpath.t -> sexp option
  • A rebase is needed but might be annoying to do. I suggest squashing some of the commits together to avoid fixing the same conflict 14 times.

@lubegasimon lubegasimon force-pushed the improve-generator-tests branch 3 times, most recently from ffe8131 to 3160bd6 Compare May 20, 2021 05:56
Signed-off-by: lubegasimon <lubegasimon73@gmail.com>
Signed-off-by: lubegasimon <lubegasimon73@gmail.com>
Signed-off-by: lubegasimon <lubegasimon73@gmail.com>
Signed-off-by: lubegasimon <lubegasimon73@gmail.com>
Signed-off-by: lubegasimon <lubegasimon73@gmail.com>
@lubegasimon lubegasimon force-pushed the improve-generator-tests branch 10 times, most recently from 30e94f3 to 0477357 Compare May 26, 2021 08:53
@lubegasimon lubegasimon force-pushed the improve-generator-tests branch from 4fb30d4 to 5768e21 Compare May 26, 2021 13:35
Signed-off-by: lubegasimon <lubegasimon73@gmail.com>
Signed-off-by: lubegasimon <lubegasimon73@gmail.com>
Signed-off-by: lubegasimon <lubegasimon73@gmail.com>
Signed-off-by: lubegasimon <lubegasimon73@gmail.com>
@lubegasimon lubegasimon force-pushed the improve-generator-tests branch from 5768e21 to ad05e71 Compare May 26, 2021 14:17
Signed-off-by: lubegasimon <lubegasimon73@gmail.com>
@lubegasimon
Copy link
Collaborator Author

Ready for another review

This was referenced Jun 28, 2021
@jonludlam
Copy link
Member

The v2 PR #697 looks much nicer, so closing this one!

@jonludlam jonludlam closed this Jul 6, 2021
@lubegasimon lubegasimon deleted the improve-generator-tests branch August 13, 2021 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve generators' tests

3 participants