There’s no Program module among (modules test) and (libraries ounit2). Also the executable cannot be listed under libraries.
There’s two ways to approach this:
Put Program into a dune library and make both the tests and the executable depend on that library.
If you’ll only have these two modules, you can use the plural (executables) stanza and put both program and test into it. Then I think they can access each other. But you’ll need a separate (rule) to actually run test.exe then.