I have inherited a large, messy Fortran code developed at different stages in time by different people. The code is poorly documented and many of the individuals responsible for development are not available (i.e they do not work at the company anymore).
One application I would like to achieve is to refactor the code based on coverage for a particular test. Each individual test covers only 10-20 percent of the code at any given time. If I'm fixing one test at a time it is truly overkill to have to go through the entire code. I need a reduced version of the same code which is guaranteed to run that particular test, but which doesn't contain all the extra crap I don't need. This would enable fast and efficient determination of how the parameters influence one another. It would save an enormous amount of time because I would know for sure that everything I'm looking at in this reduced version of the code is relevant.
I have tried many things, such as:
So far I have been refactoring the code manually using the test of interest, a coverage analysis result and tracking changes using a local svn repository so I don't get lost. This takes an unrealistic amount of time for each test. I realize this is a highly specific problem case but at the same time I know many legacy fortran codes are just as huge, and possibly encounter the same problems. Am I doomed to having to custom-develop something for this use-case or are there efficient tools out there that can alleviate my misery?