From aaf675de514d71f0ed06e16d0ae092b43ca4cdc6 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Thu, 13 Apr 2023 11:52:09 -0700 Subject: [PATCH] test: generate_opam_files and fresh build (#7546) Signed-off-by: Rudi Grinberg --- .../dune-project-meta/fresh-build.t | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/blackbox-tests/test-cases/dune-project-meta/fresh-build.t diff --git a/test/blackbox-tests/test-cases/dune-project-meta/fresh-build.t b/test/blackbox-tests/test-cases/dune-project-meta/fresh-build.t new file mode 100644 index 00000000000..278dd125b7c --- /dev/null +++ b/test/blackbox-tests/test-cases/dune-project-meta/fresh-build.t @@ -0,0 +1,24 @@ +Building the .install file should not depend on foo.opam being present in the +source tree if (generate_opam_files true) is enabled. + + $ cat >dune-project < (lang dune 3.8) + > (package + > (name foo)) + > (generate_opam_files true) + > EOF + + $ cat >dune < (install + > (section share) + > (files dune)) + > EOF + + $ dune build foo.install + $ grep opam _build/default/foo.install + [1] + + $ dune build @check + $ dune build foo.install + $ grep opam _build/default/foo.install + "_build/install/default/lib/foo/opam"