Closed RyanGlScott closed 3 years ago
I think the appropriate thing to do in many cases is actually
test.sh
to delete the intermediate files after running the test.Several integration tests already do this for temporary files that are created earlier in the same script.
In the case of .bc
files, I think the answer is that those should always be checked in. Otherwise it can be hard to recreate the right file locally depending on which OS you're running. For the test_llvm_x86_*
tests, we should probably also check in the compiled .o
files; I think the ones I have in my local repo were copied from someone else who compiled them on Linux so that I could get the tests to work at all.
I'd say that we probably shouldn't be using .gitignore
for anything left over from test scripts, unless we also provide a make clean
script that can clean them up. For maximum reproducibility in the test suite, it would be best if it's possible to always run the integration tests with exactly the same initial directory contents.
I'd say that we probably shouldn't be using
.gitignore
for anything left over from test scripts, unless we also provide amake clean
script that can clean them up.
That sounds reasonable to me.
My first inclination was to write a script that traverses each test*/
directory, and if there exists a Makefile
with a clean
target, run it. However, this is actually too aggressive for what we want, as there are some existing Makefile
s where clean
removes files that have been checked into version control. For example, intTests/test_crucible_jvm/Makefile
's clean
target will remove Arr.class
, Dyn.class
, etc.
Some other possibilities for a cleaning script:
git clean
in each test*
directory to remove its untracked files. This is also probably too powerful for what we want, as we'd like to specify exactly what files ought to be removed in order to avoid accidentally deleting our work when running the clean script.clean
targets in each target's Makefile
, one of which is geared specifically towards the clean script (and therefore will never delete any version-controlled files), and another which is more aggressive (e.g., intTests/test_crucible_jvm/Makefile
's clean
target)..gitignore
situation in saw-script
, so I'm inclined to just close this.
After running
intTests/runtests.sh
, mygit
tree is left in a significantly dirtier state:This makes making changes to the
intTests
directory more annoying, since you have to avoid accidentallygit add
ing these files. It seems like most of these files are autogenerated during the course of running the integration tests, so we should audit each file and either:.gitignore
file, or.bc
files, might actually differ between different LLVM versions / operating systems / etc., so checking them in might make these tests more portable. But this would need to be evaluated on a case-by-case basis.