Closed xinshengqin closed 7 years ago
This looks fine to me. @rjleveque do you have any idea how this might break things if implemented?
This only removes the *.o
and *.mod
files in the test directory, not in the library directories, as far as I can tell. I inserted print statements in test.py
to print each file as it removes it.
So I'm not sure this addresses clawpack/amrclaw#196.
On the other hand, if I change a library file and then redo nosetests
, it does recompile the library routine, so I'm not sure why there's even an issue here??
Otherwise, this PR seems to work fine in the repositories I tested it in.
@rjleveque I think it's a matter of whether we want to remove the .o and .mod files in the library directories.
I think nosetests is calling make in it. So if you change a library file, when you run nosetests, it calls make and make knows that the source code has been changed and recompile that.
The library is always rebuilt at the beginning of a set of tests. @xinshengqin's issue involved local source (qinit
for instance) that would not be rebuilt so I think this does what we want.
Just updated it.
I have tested it with no *.o files in test path so I think it works even glob returns nothing