Requirements for dune inline tests

In this c-cube/gen issue the maintainer claims dune runtest works for him, while it fails for me with unexpanded variables in the qtest extract '${impl-files}' '${intf-files}' command. This is the dune file:

(library
  (public_name gen)
  ....
  (inline_tests (backend qtest.lib))
)

What are the prerequisites to successfully do such inline tests? I have “the latest” qtest,qcheck,dune in the build chroot, and on my workstation.

Shouldn’t it be %{impl-files} and %{intf-files}?

According to doc/tests.rst a plain (inline_tests (backend qtest.lib)) should be enough. The way I read the documentation these %{impl-files} variables are only needed for Defining your own inline test backend.

Indeed, you’re right. I was just commenting that qtest is still using the old template syntax: https://github.com/vincent-hugot/qtest/blob/master/src/dune

It’s a bug on dune’s side that it should really be interpreting these variables correctly. However, the simplest workaround for you might be to just upgrade qtest to a recent dune lang and try again. We are dropping support for ${..} vars in dune 2.0 anyways.

One can workaround it by just running the tests manually, which is probably what dune is supposed to do internally? See my conversion of ptmap to dune.