hanchenye-llvm-project/compiler-rt/lib/sanitizer_common/tests
George Karpenkov 769124dc5e [sanitizers CMake] NFC Refactor the logic for compiling and generating tests
into a function.

Most CMake configuration under compiler-rt/lib/*/tests have
almost-the-same-but-not-quite functions of the form add_X_[unit]tests
for compiling and running the tests.
Much of the logic is duplicated with minor variations across different
sub-folders.
This can harm productivity for multiple reasons:

For newcomers, resulting CMake files are very large, hard to understand,
and hide the intention of the code.
Changes for enabling certain architectures end up being unnecessarily
large, as they get duplicated across multiple folders.
Adding new sub-projects requires more effort than it should, as a
developer has to again copy-n-paste the configuration, and it's not even
clear from which sub-project it should be copy-n-pasted.
With this change the logic of compile-and-generate-a-set-of-tests is
extracted into a function, which hopefully makes writing and reading
CMake much easier.

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

llvm-svn: 310971
2017-08-15 22:56:10 +00:00
..
CMakeLists.txt [sanitizers CMake] NFC Refactor the logic for compiling and generating tests 2017-08-15 22:56:10 +00:00
malloc_stress_transfer_test.cc
sanitizer_allocator_test.cc [Sanitizers] 64 bit allocator respects allocator_may_return_null flag 2017-06-26 22:54:10 +00:00
sanitizer_allocator_testlib.cc Recommit: Stop intercepting some malloc-related functions on FreeBSD and 2017-01-30 19:06:13 +00:00
sanitizer_atomic_test.cc
sanitizer_bitvector_test.cc [compiler-rt] Fix fix format specifies type in test 2017-07-16 00:17:11 +00:00
sanitizer_bvgraph_test.cc
sanitizer_common_test.cc [sanitizers] Add a blocking boolean to GetRandom prototype 2017-08-14 14:53:47 +00:00
sanitizer_deadlock_detector_test.cc
sanitizer_flags_test.cc [sanitizer-coverage] nuke more stale code 2017-06-02 01:17:04 +00:00
sanitizer_format_interceptor_test.cc [asan] Fix handling of %m in printf interceptor. 2016-12-27 22:14:03 +00:00
sanitizer_ioctl_test.cc
sanitizer_libc_test.cc [sanitizer_common] Move filesystem-related code out of sanitizer_common.cc 2017-07-22 01:46:40 +00:00
sanitizer_linux_test.cc [sanitizer_common] Move filesystem-related code out of sanitizer_common.cc 2017-07-22 01:46:40 +00:00
sanitizer_list_test.cc Whenever reasonable, merge ASAN quarantine batches to save memory. 2017-01-19 22:15:54 +00:00
sanitizer_mutex_test.cc
sanitizer_nolibc_test.cc
sanitizer_nolibc_test_main.cc [compiler-rt] Do not introduce __sanitizer namespace globally 2016-09-15 21:02:18 +00:00
sanitizer_posix_test.cc
sanitizer_printf_test.cc
sanitizer_procmaps_test.cc [sanitizer] Track architecture and UUID of modules in LoadedModule 2016-12-02 21:27:14 +00:00
sanitizer_pthread_wrappers.h
sanitizer_quarantine_test.cc Whenever reasonable, merge ASAN quarantine batches to save memory. 2017-01-19 22:15:54 +00:00
sanitizer_stackdepot_test.cc
sanitizer_stacktrace_printer_test.cc [sanitizer] Use architecture/slice information when symbolizing fat Mach-O files on Darwin 2017-01-06 21:45:05 +00:00
sanitizer_stacktrace_test.cc
sanitizer_stoptheworld_test.cc
sanitizer_stoptheworld_testlib.cc
sanitizer_suppressions_test.cc
sanitizer_symbolizer_test.cc
sanitizer_test_config.h
sanitizer_test_main.cc [compiler-rt] Do not introduce __sanitizer namespace globally 2016-09-15 21:02:18 +00:00
sanitizer_test_utils.h Add NetBSD support in sanitizer_test_utils.h 2017-08-07 10:59:44 +00:00
sanitizer_thread_registry_test.cc Fixup of r293882: Forgot to update sanitizer_thread_registry.test.cc 2017-02-02 13:07:22 +00:00
standalone_malloc_test.cc