Mark,
Thanks for getting back, and apologies for the preemptive defensiveness. I've gotten too used to asking questions on stack overflow where some yahoo decides my question is wrong and tells me to do something unrelated to what I asked. I'm glad you're not doing that. :)
So the way I use the script right now is as follows:
1. My make finds my test harnesses
2. for each of those harnesses is generates a runner
3. for each of those harnesses it generates a list of the mocks included in that harness
4. dependencies are created based on that list
5. cmock.rb is called for all the mocks found in that list
So for my specific use case, the most useful is the find_mocks.rb that generates a space separated list of mocks found in the harness to stdout. An option to specify the mock prefix would also be useful although I use what I think is the default of "mock_".
As for your other questions, I prefer stdout right now, but there might be some use to generate a file, specifically a .dep file like output so that resulting file could just be included. This I think would of course require an option to specify the directory where these mocks would be placed.
Somethign like this:
my_test_harness.c : mock_module_a.h mock_module_q.h
Or with the directory
modules/my_module/test/my_test_harness.c : out/mocks/mock_module_a.h out/mocks/mock_module_q.h
Alternatively it could just output such a make rule to stdout, because that can always be redirected to a file.
For the list of unmocked headers, I don't see a use for that, but you're probably thinking of something I'm not. I'd like to know what road you were going down for that because it might lead to something useful.
Finally, If there is some way to make
generate_test_runner.rb automatically generate such a makefile as above or generate the same list as the find_mocks.rb and that make cmock cleaner, that's also a fine way to handle things. The idea of
generate_test_runner.rb generating the list of mocks when it has to be run anyway to generate the runner for each harness anyway has some appeal because it's just one less step.
Thanks for this, Mark.
Kris