Debugging dune not running tests after code change

I have a simple little experimental project I’m working on. There is a src directory with most of my code. This names the library, and gives some external dependencies. There is a test directory with a single test stanza that depends on my library.

(test
  (name test)
  (libraries mylib <more libs>))

When I make changes to the code in src that is indeed being called by my test, dune runtest doesn’t rerun my test.

Setting up another project to try and simplify this does what I expect and reruns the test each time. I was wondering if anyone had any suggestions on how I might debug this.

(I can push the code somewhere if that is helpful)

Additional information: If I use dune runtest --verbose, the last step it prints build _build/default/test/test.exe, it just doesn’t then run it.

This sounds like a bug in dune, it should rerun a test if anything in the dependency tree of that test has been changed. Maybe try a newer version of dune? If that doesn’t help it could make sense to report it as bug.

I’ve reported the bug here. It happens with both Dune 2.4.0 as well as git master. Unfortunately, I don’t seem to be able to reproduce it by shrinking down by making a simpler test case.