HomePhabricator

dotest: make inline tests compatible with -f

Authored by labath on Jun 5 2018, 3:58 AM.

Description

dotest: make inline tests compatible with -f

Summary:
This is split off from D47265 where I needed to be able to invoke every test
with -f. That patch is kinda dead now, but this part seems like a good
cleanup anyway.

The problem with inline tests was in the way we were adding methods to
the class, which left them with an incorrect name property. This
prevented dotest from finding them with -f.

I fix this with (what I think is) the correct way of dynamically
creating classes -- passing the list of methods during type construction
instead of fixing up the class afterwards. Among other things this has
the advantage of not needing to do anything special for debug info
variants. As our test method will be visible to the metaclass, it will
automagically do the multiplication for us.

Reviewers: JDevlieghere, aprantl, tberghammer

Subscribers: eraman, lldb-commits

Differential Revision: https://reviews.llvm.org/D47579

llvm-svn: 334009

Details

Committed
labathJun 5 2018, 3:58 AM
Differential Revision
D47579: dotest: make inline tests compatible with -f
Parents
rG53d35d2dc4a6: [llvm-exegesis] Add instructions to BenchmarkResult Key.
Branches
Unknown
Tags
Unknown