[PATCH] D34855: [lit] Factor out listdir logic shared by different test formats.

David L. Jones via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 18:02:21 PDT 2017


dlj created this revision.
Herald added a subscriber: sanjoy.
Herald added a reviewer: modocache.

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.


https://reviews.llvm.org/D34855

Files:
  utils/lit/lit/formats/googletest.py
  utils/lit/lit/formats/shtest.py
  utils/lit/lit/util.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34855.104800.patch
Type: text/x-patch
Size: 6764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170630/63441e71/attachment.bin>


More information about the llvm-commits mailing list