[libc] Add option to run specific tests
authorCaitlyn Cano <caitlyncano@google.com>
Mon, 12 Jul 2021 20:32:51 +0000 (20:32 +0000)
committerCaitlyn Cano <caitlyncano@google.com>
Fri, 23 Jul 2021 16:08:13 +0000 (16:08 +0000)
commitfa7a9ef1784eca70bc6653bcda6e9a02e0f900bb
treed4174205bae9b6476332cf67a50daf4bf9f5eb74
parentcc6d302c91baad2ecf3c9a75ce68d552df0a42b7
[libc] Add option to run specific tests

This addition reads command line input to run specific single tests
within a larger call to run all the tests for a particular function.
When the user adds a second argument to the command line, the code skips
all the tests that don't match the user's specified binary. If the user
doesn't specify a test correctly and/or no tests are run, a failure
message prints.

Reviewed By: sivachandra, aeubanks

Differential Revision: https://reviews.llvm.org/D105843
libc/cmake/modules/LLVMLibCTestRules.cmake
libc/test/utils/CMakeLists.txt
libc/test/utils/UnitTest/CMakeLists.txt [new file with mode: 0644]
libc/test/utils/UnitTest/testfilter_test.cpp [new file with mode: 0644]
libc/utils/UnitTest/CMakeLists.txt
libc/utils/UnitTest/LibcTest.cpp
libc/utils/UnitTest/LibcTest.h
libc/utils/UnitTest/LibcTestMain.cpp [new file with mode: 0644]