From 21e98b485195b88716b92a1c83bde2a9f2008a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Basile=20Cl=C3=A9ment?= Date: Thu, 16 Nov 2023 13:10:03 +0100 Subject: [PATCH] [gentest] Restore automatic creation of expected files The `gentest.ml` scripts automatically creates the `.expected` files when it is run. However, since we are now running the `gentest.ml` script through `dune` to create the `dune.inc` file, it is run in the build directory and the created `.expected` files are not moved back to the source directory. This patch is a dirty hack that runs the `gentest.ml` script twice (first time in the source directory to create the `.expected` files, second time through `dune` to update the `dune.inc`) to restore the automatic creation of `.expected` files. Long-term it would probably be better to have an option (or a different script) instead, but for now this should do. --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 8ffddbb83..50677c92f 100644 --- a/Makefile +++ b/Makefile @@ -117,6 +117,9 @@ packages: # Generate new Dune tests from the problems in # the directory tests/. gentest: $(wildcard tests/**/*) + # TODO: There should be an option to gentest to avoid printing the + # dune.inc file and only touch the expected files in this call. + dune exec -- tools/gentest.exe tests >/dev/null dune build @tests/gentest --auto-promote # Run non-regression tests.