Page MenuHomePhabricator

[lit] Allow more file extensions for test cases.
ClosedPublic

Authored by logan on Aug 31 2016, 9:16 AM.

Details

Summary

This commit splits the file extensions before determining the test
format. This allows libc++abi to add assembly-based test cases.

Diff Detail

Event Timeline

logan updated this revision to Diff 69868.Aug 31 2016, 9:16 AM
logan retitled this revision from to [lit] Allow more file extensions for test cases..
logan updated this object.
logan added reviewers: mclow.lists, EricWF.
logan added a subscriber: cfe-commits.
EricWF edited edge metadata.Sep 3 2016, 6:47 PM

I don't think assembly based .pass and .fail tests will work quite yet. The CXXCompiler object used by the test format explicitly passes -xc++ %s in some cases.
I'm assuming you already have a libc++abi assembly test? Could you put it up for review?

EricWF accepted this revision.Sep 3 2016, 6:50 PM
EricWF edited edge metadata.

Woops I see the test case now. LGTM.

test/libcxx/test/format.py
69

Since we only support .sh.XXX tests let's only loosen the restriction there for now.

This revision is now accepted and ready to land.Sep 3 2016, 6:50 PM
logan added inline comments.Sep 6 2016, 3:43 AM
test/libcxx/test/format.py
69

Do you mean that it is preferred to revert following two lines back? For example:

is_sh_test = name_root.endswith('.sh')
is_pass_test = name.endswith('.pass.cpp')
is_fail_test = name.endswith('.fail.cpp')
assert is_sh_test or name_ext == '.cpp'
EricWF added inline comments.Sep 6 2016, 4:26 AM
test/libcxx/test/format.py
69

Yeah. Leave a FIXME about CXXCompiler not supporting assembly if you want.

logan closed this revision.Oct 3 2016, 9:11 AM

Thanks for reviewing. Committed as rL283118 with the suggested change regarding to is_sh_test assertion.