This is an archive of the discontinued LLVM Phabricator instance.

Add a %basename substitution
ClosedPublic

Authored by rafael on Mar 30 2017, 8:10 AM.

Details

Summary

This will be used to avoid various call to basename in the asan test.

Diff Detail

Event Timeline

rafael created this revision.Mar 30 2017, 8:10 AM
filcab accepted this revision.Mar 31 2017, 6:42 AM

LGTM

This revision is now accepted and ready to land.Mar 31 2017, 6:42 AM
rnk added inline comments.Mar 31 2017, 9:26 AM
utils/lit/lit/TestRunner.py
704

%basename doesn't seem like a very obvious substitution to me. It should be equivalent to the basename of the source path. Can you think of a more intuitive name for it? %sbase? %sbasename? %sourcebasename?

We have an existing convention that capital letters are the dirname of that substitution, which is OK, but I can't think of another convention that would get the basename of that letter.

I guess I like %sourcebasename best. It's long and descriptive, but this is only used inside sanitizer lit.common.cfg to form other more high-level substitutions.

rnk added inline comments.Mar 31 2017, 10:19 AM
utils/lit/lit/TestRunner.py
704

%basename_t sounds good. You're right, I thought you were doing the basename of %t before adding .tmp, which would make %basename_s and %basename_t the same.

rnk accepted this revision.Mar 31 2017, 10:20 AM

lgtm

rafael closed this revision.Apr 6 2017, 12:58 PM