[PATCH] D25869: [Driver] Add unit tests for DetectDistro()

Michał Górny via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 21 06:57:27 PDT 2016


mgorny created this revision.
mgorny added reviewers: bruno, bkramer, rafael.
mgorny added a subscriber: cfe-commits.
Herald added a subscriber: beanz.

Add a set of unit tests for the DetectDistro() function in Driver. Make
the function itself (and the enum) visible in the library for the tests.

The tests use an in-memory virtual filesystems resembling release files
for various distributions supported. All release files are provided (not
only the ones directly used) in order to guarantee that one of the rules
will not mistakenly recognize the distribution incorrectly due to
the additional files (e.g. Ubuntu as Debian).


https://reviews.llvm.org/D25869

Files:
  lib/Driver/ToolChains.cpp
  lib/Driver/ToolChains.h
  unittests/Driver/CMakeLists.txt
  unittests/Driver/ToolChainsTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25869.75418.patch
Type: text/x-patch
Size: 12627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161021/7f44b835/attachment-0001.bin>


More information about the cfe-commits mailing list