]> granicus.if.org Git - llvm/commit
[lit] Factor out listdir logic shared by different test formats.
authorDavid L. Jones <dlj@google.com>
Fri, 30 Jun 2017 21:58:55 +0000 (21:58 +0000)
committerDavid L. Jones <dlj@google.com>
Fri, 30 Jun 2017 21:58:55 +0000 (21:58 +0000)
commit8c7c8491f0ab4ffe0b39a792cef4bee068c1d623
treef4bdb52cf55a52f73d0f0592e1965313c7c60a35
parent429cd8e58804dcc3d910c7adfbf98cafe1613770
[lit] Factor out listdir logic shared by different test formats.

Summary:
The lit test formats use largely the same logic for discovering tests. There are
some superficial differences in the logic, which seem reasonable enough to
handle in a single routine.

At a high level, the common goal is "look for files that end with one of these
suffixes, and skip anything starting with a dot." The balance of the logic
specific to ShTest and GoogleTest collapses quite a bit, so that
getTestsInDirectory is only a couple of lines around a call to the new function.

Reviewers: zturner, MatzeB, modocache

Subscribers: sanjoy, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306895 91177308-0d34-0410-b5e6-96231b3b80d8
utils/lit/lit/formats/googletest.py
utils/lit/lit/formats/shtest.py
utils/lit/lit/util.py