This is an archive of the discontinued LLVM Phabricator instance.

Compilation database test: don't try to output to CWD
ClosedPublic

Authored by sammccall on Dec 6 2016, 11:39 PM.

Details

Summary

Write output from compilation database test to %T rather than the working dir.
Sometimes CWD isn't writable!
Also specify no-canonical-prefixes so that clang has 'clang' in the name.

Diff Detail

Repository
rL LLVM

Event Timeline

sammccall updated this revision to Diff 80544.Dec 6 2016, 11:39 PM
sammccall retitled this revision from to Compilation database test: don't try to output to CWD.
sammccall updated this object.
sammccall added a reviewer: bkramer.
sammccall added subscribers: cfe-commits, joerg.

bkramer: summoning my lit guru for guidance, is there a better way?

bkramer accepted this revision.Dec 7 2016, 1:24 AM
bkramer edited edge metadata.

Annoying. This test really shouldn't generate binary object files.

Can we check in this patch now to unblock stuff and then look into how to do a dry run with -MJ? Usually driver tests use -### for that but the code for -MJ explicitly disables itself when -### is found on the command line.

test/Driver/compilation_database.c
2 ↗(On Diff #80544)

You can hoist the cd %T to a separate RUN line at the top instead of duplicating it.

This revision is now accepted and ready to land.Dec 7 2016, 1:24 AM
sammccall updated this revision to Diff 80553.Dec 7 2016, 1:27 AM
sammccall edited edge metadata.

Hoist cd %T to avoid repeating it.

sammccall marked an inline comment as done.Dec 7 2016, 1:28 AM

Thanks! That makes sense.

This revision was automatically updated to reflect the committed changes.