Page MenuHomePhabricator

Clean up dependency .d.$$$$ files for tests
ClosedPublic

Authored by labath on Feb 4 2015, 5:51 AM.

Details

Summary

Mac-only tests were leaving .d.$$$$ dependency files left in the test tree. This happened
because:

  1. "make clean" was invoked although no tests in the folder were run
  2. The Makefile had main.d as a dependency, which meant it tried to compile the source file (to extract

dependencies).

  1. The compile failed (does not compile on linux) and left behind a main.d.$$$$ temporary file.
  2. "make clean" tried to clean up these temporary files, but the expansion $(wildcard *.d.[0-9]*)

was performed before the temporary file was created, so this file was not caught.

I fix this by giving all the temporary files deterministic names, which makes it easier to clean
them up afterwards. I also make the rules for generating the dependency files more robust and
less likely to leak files in the first place.

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 19315.Feb 4 2015, 5:51 AM
labath retitled this revision from to Clean up dependency .d.$$$$ files for tests.
labath updated this object.
labath edited the test plan for this revision. (Show Details)
labath added reviewers: vharron, zturner.
labath added a subscriber: Unknown Object (MLST).
vharron accepted this revision.Feb 4 2015, 11:47 AM
vharron edited edge metadata.
This revision is now accepted and ready to land.Feb 4 2015, 11:47 AM
This revision was automatically updated to reflect the committed changes.