diff --git a/CMakeLists.txt b/CMakeLists.txt index 49dd96451f0..5f86ea17af3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -453,627 +453,46 @@ if (BUILD_TESTS OR BUILD_BENCHMARKS) ) apply_folly_compile_options_to_target(folly_test_support) - folly_define_tests( - DIRECTORY algorithm/simd/detail/test/ - TEST algorithm_simd_detail_simd_any_of_test SOURCES SimdAnyOfTest.cpp - TEST algorithm_simd_detail_simd_for_each_test SOURCES SimdForEachTest.cpp - TEST algorithm_simd_detail_simd_traits_test SOURCES TraitsTest.cpp - TEST algorithm_simd_detail_unroll_utils_test SOURCES UnrollUtilsTest.cpp + # Test definitions live with their corresponding test directories. + include(${FOLLY_DIR}/algorithm/simd/detail/test/CMakeLists.txt) + include(${FOLLY_DIR}/algorithm/simd/test/CMakeLists.txt) + include(${FOLLY_DIR}/chrono/test/CMakeLists.txt) + include(${FOLLY_DIR}/cli/test/CMakeLists.txt) + include(${FOLLY_DIR}/codec/test/CMakeLists.txt) + include(${FOLLY_DIR}/compression/test/CMakeLists.txt) + include(${FOLLY_DIR}/compression/elias_fano/test/CMakeLists.txt) + include(${FOLLY_DIR}/container/test/CMakeLists.txt) + include(${FOLLY_DIR}/concurrency/container/test/CMakeLists.txt) + include(${FOLLY_DIR}/concurrency/test/CMakeLists.txt) + include(${FOLLY_DIR}/detail/test/CMakeLists.txt) + include(${FOLLY_DIR}/detail/base64_detail/test/CMakeLists.txt) + include(${FOLLY_DIR}/executors/test/CMakeLists.txt) + include(${FOLLY_DIR}/executors/task_queue/test/CMakeLists.txt) + include(${FOLLY_DIR}/external/farmhash/test/CMakeLists.txt) + include(${FOLLY_DIR}/logging/test/CMakeLists.txt) + include(${FOLLY_DIR}/fibers/test/CMakeLists.txt) + include(${FOLLY_DIR}/functional/test/CMakeLists.txt) + include(${FOLLY_DIR}/futures/test/CMakeLists.txt) + include(${FOLLY_DIR}/gen/test/CMakeLists.txt) + include(${FOLLY_DIR}/hash/test/CMakeLists.txt) + include(${FOLLY_DIR}/io/test/CMakeLists.txt) + include(${FOLLY_DIR}/io/async/test/CMakeLists.txt) + include(${FOLLY_DIR}/io/async/ssl/test/CMakeLists.txt) + include(${FOLLY_DIR}/lang/test/CMakeLists.txt) + include(${FOLLY_DIR}/memory/test/CMakeLists.txt) + include(${FOLLY_DIR}/net/detail/test/CMakeLists.txt) + include(${FOLLY_DIR}/portability/test/CMakeLists.txt) + include(${FOLLY_DIR}/ssl/test/CMakeLists.txt) + include(${FOLLY_DIR}/stats/test/CMakeLists.txt) + include(${FOLLY_DIR}/synchronization/test/CMakeLists.txt) + include(${FOLLY_DIR}/synchronization/detail/test/CMakeLists.txt) + include(${FOLLY_DIR}/system/test/CMakeLists.txt) + include(${FOLLY_DIR}/test/CMakeLists.txt) + include(${FOLLY_DIR}/testing/test/CMakeLists.txt) + include(${FOLLY_DIR}/tracing/test/CMakeLists.txt) + include(${FOLLY_DIR}/json/test/CMakeLists.txt) + include(${FOLLY_DIR}/crypto/test/CMakeLists.txt) - DIRECTORY algorithm/simd/test/ - TEST algorithm_simd_contains_test SOURCES ContainsTest.cpp - TEST algorithm_simd_find_first_of_test SOURCES find_first_of_test.cpp - TEST algorithm_simd_find_fixed_test SOURCES FindFixedTest.cpp - TEST algorithm_simd_movemask_test SOURCES MovemaskTest.cpp - DIRECTORY chrono/test/ - TEST chrono_conv_test WINDOWS_DISABLED - SOURCES ConvTest.cpp - DIRECTORY cli/test/ - TEST cli_args_test SOURCES ArgsTest.cpp - - DIRECTORY codec/test/ - TEST codec_hex_test SOURCES hex_test.cpp - TEST codec_uuid_test SOURCES UuidTest.cpp - - DIRECTORY compression/test/ - TEST compression_compression_test SLOW SOURCES CompressionTest.cpp - TEST compression_quotient_multiset_test SOURCES QuotientMultiSetTest.cpp - TEST compression_select64_test SOURCES Select64Test.cpp - - DIRECTORY compression/elias_fano/test/ - TEST compression_alias_fano_bit_vector_coding_test - SOURCES BitVectorCodingTest.cpp - TEST compression_alias_fano_elias_fano_test - SOURCES EliasFanoCodingTest.cpp - - DIRECTORY container/test/ - TEST container_access_test SOURCES AccessTest.cpp - TEST container_array_test SOURCES ArrayTest.cpp - BENCHMARK container_bit_iterator_bench SOURCES BitIteratorBench.cpp - TEST container_bit_iterator_test SOURCES BitIteratorTest.cpp - TEST container_enumerate_test SOURCES EnumerateTest.cpp - BENCHMARK container_evicting_cache_map_bench - SOURCES EvictingCacheMapBench.cpp - TEST container_evicting_cache_map_test SOURCES EvictingCacheMapTest.cpp - TEST container_f14_fwd_test SOURCES F14FwdTest.cpp - TEST container_f14_map_test SOURCES F14MapTest.cpp - TEST container_f14_set_test SOURCES F14SetTest.cpp - BENCHMARK container_fbvector_benchmark - SOURCES FBVectorBenchmark.cpp - HEADERS FBVectorBenchmarks.cpp.h - TEST container_fbvector_test SOURCES FBVectorTest.cpp - BENCHMARK container_foreach_benchmark SOURCES ForeachBenchmark.cpp - TEST container_foreach_test SOURCES ForeachTest.cpp - BENCHMARK container_hash_maps_bench SOURCES HashMapsBench.cpp - TEST container_heap_vector_types_test SOURCES heap_vector_types_test.cpp - TEST container_map_util_test WINDOWS_DISABLED SOURCES MapUtilTest.cpp - TEST container_merge_test SOURCES MergeTest.cpp - TEST container_regex_match_cache_test SOURCES RegexMatchCacheTest.cpp - TEST container_small_vector_test WINDOWS_DISABLED - SOURCES small_vector_test.cpp - TEST container_sorted_vector_types_test SOURCES sorted_vector_test.cpp - TEST container_span_test SOURCES span_test.cpp - TEST container_std_bitset_test SOURCES StdBitsetTest.cpp - BENCHMARK container_sparse_byte_set_benchmark - SOURCES SparseByteSetBenchmark.cpp - TEST container_sparse_byte_set_test SOURCES SparseByteSetTest.cpp - TEST container_util_test SOURCES UtilTest.cpp - - DIRECTORY concurrency/container/test/ - TEST concurrency_container_lock_free_ring_buffer_test - SOURCES LockFreeRingBufferTest.cpp - - DIRECTORY concurrency/test/ - TEST concurrency_atomic_shared_ptr_test SOURCES AtomicSharedPtrTest.cpp - TEST concurrency_cache_locality_test WINDOWS_DISABLED - SOURCES CacheLocalityTest.cpp - TEST concurrency_core_cached_shared_ptr_test - SOURCES CoreCachedSharedPtrTest.cpp - BENCHMARK concurrency_concurrent_hash_map_bench WINDOWS_DISABLED - SOURCES ConcurrentHashMapBench.cpp - TEST concurrency_concurrent_hash_map_stress_test SLOW WINDOWS_DISABLED - SOURCES ConcurrentHashMapStressTest.cpp - TEST concurrency_concurrent_hash_map_test WINDOWS_DISABLED - SOURCES ConcurrentHashMapTest.cpp - TEST concurrency_dynamic_bounded_queue_test WINDOWS_DISABLED - SOURCES DynamicBoundedQueueTest.cpp - TEST concurrency_priority_unbounded_queue_set_test - SOURCES PriorityUnboundedQueueSetTest.cpp - BENCHMARK concurrency_thread_cached_synchronized_bench - SOURCES ThreadCachedSynchronizedBench.cpp - TEST concurrency_thread_cached_synchronized_test - SOURCES ThreadCachedSynchronizedTest.cpp - TEST concurrency_unbounded_queue_test SOURCES UnboundedQueueTest.cpp - - DIRECTORY detail/test/ - TEST detail_simple_simd_string_utils_test - SOURCES SimpleSimdStringUtilsTest.cpp - TEST detail_split_string_simd_test WINDOWS_DISABLED - SOURCES SplitStringSimdTest.cpp - TEST detail_static_singleton_manager_test - SOURCES StaticSingletonManagerTest.cpp - TEST detail_type_list_test SOURCES TypeListTest.cpp - - DIRECTORY detail/base64_detail/test/ - TEST detail_base64_detail_test WINDOWS_DISABLED - SOURCES - Base64AgainstScalarTest.cpp - Base64PlatformTest.cpp - Base64SpecialCasesTest.cpp - - DIRECTORY executors/test/ - TEST executors_async_helpers_test SOURCES AsyncTest.cpp - TEST executors_codel_test WINDOWS_DISABLED SOURCES CodelTest.cpp - BENCHMARK executors_edf_thread_pool_executor_benchmark - SOURCES EDFThreadPoolExecutorBenchmark.cpp - TEST executors_executor_test SOURCES ExecutorTest.cpp - TEST executors_fiber_io_executor_test SOURCES FiberIOExecutorTest.cpp - # FunctionSchedulerTest has a lot of timing-dependent checks, - # and tends to fail on heavily loaded systems. - TEST executors_function_scheduler_test BROKEN - SOURCES FunctionSchedulerTest.cpp - TEST executors_global_executor_test SOURCES GlobalExecutorTest.cpp - TEST executors_serial_executor_test SOURCES SerialExecutorTest.cpp - # Fails in ThreadPoolExecutorTest.RequestContext:719 data2 != nullptr - TEST executors_thread_pool_executor_test BROKEN WINDOWS_DISABLED - SOURCES ThreadPoolExecutorTest.cpp - TEST executors_threaded_executor_test SOURCES ThreadedExecutorTest.cpp - TEST executors_timed_drivable_executor_test - SOURCES TimedDrivableExecutorTest.cpp - - DIRECTORY executors/task_queue/test/ - TEST executors_task_queue_priority_unbounded_blocking_queue_test - SOURCES PriorityUnboundedBlockingQueueTest.cpp - BENCHMARK executors_task_queue_unbounded_blocking_queue_bench - SOURCES UnboundedBlockingQueueBench.cpp - TEST executors_task_queue_unbounded_blocking_queue_test - SOURCES UnboundedBlockingQueueTest.cpp - - #DIRECTORY experimental/test/ - #TEST nested_command_line_app_test SOURCES NestedCommandLineAppTest.cpp - #TEST program_options_test SOURCES ProgramOptionsTest.cpp - # Depends on liburcu - #TEST read_mostly_shared_ptr_test SOURCES ReadMostlySharedPtrTest.cpp - #TEST ref_count_test SOURCES RefCountTest.cpp - - #DIRECTORY experimental/io/test/ - - DIRECTORY external/farmhash/test/ - TEST external_farmhash_farmhash_test SOURCES farmhash_test.cpp - - DIRECTORY logging/test/ - TEST logging_async_file_writer_test WINDOWS_DISABLED - SOURCES AsyncFileWriterTest.cpp - TEST logging_autotimer_test SOURCES AutoTimerTest.cpp - TEST logging_config_parser_test SOURCES ConfigParserTest.cpp - TEST logging_config_update_test SOURCES ConfigUpdateTest.cpp - TEST logging_file_handler_factory_test WINDOWS_DISABLED - SOURCES FileHandlerFactoryTest.cpp - TEST logging_glog_formatter_test SOURCES GlogFormatterTest.cpp - TEST logging_immediate_file_writer_test - SOURCES ImmediateFileWriterTest.cpp - TEST logging_log_category_test SOURCES LogCategoryTest.cpp - TEST logging_logger_db_test SOURCES LoggerDBTest.cpp - TEST logging_logger_test WINDOWS_DISABLED SOURCES LoggerTest.cpp - TEST logging_log_level_test SOURCES LogLevelTest.cpp - TEST logging_log_message_test SOURCES LogMessageTest.cpp - TEST logging_log_name_test SOURCES LogNameTest.cpp - TEST logging_log_stream_test SOURCES LogStreamTest.cpp - TEST logging_rate_limiter_test SOURCES RateLimiterTest.cpp - TEST logging_standard_log_handler_test SOURCES StandardLogHandlerTest.cpp - TEST logging_xlog_test WINDOWS_DISABLED - HEADERS - XlogHeader1.h - XlogHeader2.h - SOURCES - XlogFile1.cpp - XlogFile2.cpp - XlogTest.cpp - - DIRECTORY fibers/test/ - # FiberManager swapWithException fails with segfault - BENCHMARK fibers_fibers_benchmark WINDOWS_DISABLED - SOURCES FibersBenchmark.cpp - TEST fibers_fibers_test BROKEN SOURCES FibersTest.cpp - - DIRECTORY functional/test/ - TEST functional_apply_tuple_test WINDOWS_DISABLED - SOURCES ApplyTupleTest.cpp - TEST functional_invoke_test WINDOWS_DISABLED - SOURCES InvokeTest.cpp - TEST functional_partial_test SOURCES PartialTest.cpp - TEST functional_protocol_test SOURCES protocol_test.cpp - TEST functional_traits_test SOURCES traits_test.cpp - - DIRECTORY futures/test/ - TEST futures_barrier_test SOURCES BarrierTest.cpp - TEST futures_callback_lifetime_test SOURCES CallbackLifetimeTest.cpp - TEST futures_collect_test SOURCES CollectTest.cpp - TEST futures_context_test SOURCES ContextTest.cpp - TEST futures_core_test SOURCES CoreTest.cpp - TEST futures_ensure_test SOURCES EnsureTest.cpp - TEST futures_filter_test SOURCES FilterTest.cpp - TEST futures_future_splitter_test SOURCES FutureSplitterTest.cpp - BENCHMARK futures_benchmark WINDOWS_DISABLED - SOURCES Benchmark.cpp - TEST futures_future_test WINDOWS_DISABLED - SOURCES FutureTest.cpp - TEST futures_header_compile_test SOURCES HeaderCompileTest.cpp - TEST futures_interrupt_test SOURCES InterruptTest.cpp - TEST futures_map_test SOURCES MapTest.cpp - TEST futures_non_copyable_lambda_test SOURCES NonCopyableLambdaTest.cpp - TEST futures_poll_test SOURCES PollTest.cpp - TEST futures_promise_test SOURCES PromiseTest.cpp - TEST futures_reduce_test SOURCES ReduceTest.cpp - TEST futures_retrying_test SOURCES RetryingTest.cpp - TEST futures_self_destruct_test SOURCES SelfDestructTest.cpp - TEST futures_shared_promise_test SOURCES SharedPromiseTest.cpp - TEST futures_test_executor_test SOURCES TestExecutorTest.cpp - TEST futures_then_compile_test - HEADERS - ThenCompileTest.h - SOURCES - ThenCompileTest.cpp - TEST futures_then_test SOURCES ThenTest.cpp - TEST futures_timekeeper_test WINDOWS_DISABLED SOURCES TimekeeperTest.cpp - TEST futures_times_test SOURCES TimesTest.cpp - TEST futures_unwrap_test SOURCES UnwrapTest.cpp - TEST futures_via_test SOURCES ViaTest.cpp - TEST futures_wait_test SOURCES WaitTest.cpp - TEST futures_when_test SOURCES WhenTest.cpp - TEST futures_while_do_test SOURCES WhileDoTest.cpp - TEST futures_will_equal_test SOURCES WillEqualTest.cpp - TEST futures_window_test WINDOWS_DISABLED - SOURCES WindowTest.cpp - - DIRECTORY gen/test/ - # MSVC bug can't resolve initializer_list constructor properly - TEST gen_base_test WINDOWS_DISABLED SOURCES BaseTest.cpp - TEST gen_combine_test SOURCES CombineTest.cpp - BENCHMARK gen_parallel_map_benchmark SOURCES ParallelMapBenchmark.cpp - TEST gen_parallel_map_test SOURCES ParallelMapTest.cpp - BENCHMARK gen_parallel_benchmark SOURCES ParallelBenchmark.cpp - TEST gen_parallel_test SOURCES ParallelTest.cpp - - DIRECTORY hash/test/ - BENCHMARK hash_checksum_benchmark SOURCES ChecksumBenchmark.cpp - # builds, but tests fail on MSVC cmake build - TEST hash_checksum_test WINDOWS_DISABLED - SOURCES ChecksumTest.cpp - TEST hash_farm_hash_test SOURCES FarmHashTest.cpp - BENCHMARK hash_hash_benchmark WINDOWS_DISABLED - SOURCES HashBenchmark.cpp - TEST hash_hash_test WINDOWS_DISABLED - SOURCES HashTest.cpp - TEST hash_spooky_hash_v1_test SOURCES SpookyHashV1Test.cpp - TEST hash_spooky_hash_v2_test SOURCES SpookyHashV2Test.cpp - TEST hash_traits_test SOURCES traits_test.cpp - TEST hash_unique_hash_key_test SOURCES UniqueHashKeyTest.cpp - - DIRECTORY io/test/ - TEST io_fs_util_test SOURCES FsUtilTest.cpp - BENCHMARK io_iobuf_benchmark WINDOWS_DISABLED SOURCES IOBufBenchmark.cpp - TEST io_iobuf_test WINDOWS_DISABLED SOURCES IOBufTest.cpp - TEST io_iobuf_cursor_test SOURCES IOBufCursorTest.cpp - TEST io_iobuf_queue_test SOURCES IOBufQueueTest.cpp - TEST io_record_io_test WINDOWS_DISABLED SOURCES RecordIOTest.cpp - TEST io_shutdown_socket_set_test HANGING - SOURCES ShutdownSocketSetTest.cpp - TEST io_socket_option_value_test HANGING - SOURCES SocketOptionValueTest.cpp - - DIRECTORY io/async/test/ - # A number of tests in the async_test binary are unfortunately flaky. - # When run under Travis CI a number of the tests also hang (it looks - # like they do not get expected socket accept events, causing them - # to never break out of their event loops). - TEST io_async_async_test BROKEN - CONTENT_DIR certs/ - HEADERS - AsyncSocketTest.h - AsyncSSLSocketTest.h - SOURCES - AsyncPipeTest.cpp - AsyncSocketExceptionTest.cpp - AsyncSocketTest.cpp - AsyncSocketTest2.cpp - AsyncSSLSocketTest.cpp - AsyncSSLSocketTest2.cpp - AsyncSSLSocketWriteTest.cpp - AsyncTransportTest.cpp - # This is disabled because it depends on things that don't exist - # on Windows. - # TODO: Refactor EventHandlerTest to not use eventfd so it can work on Mac OS X. - #TEST io_async_event_handler_test WINDOWS_DISABLED SOURCES EventHandlerTest.cpp - TEST io_async_async_timeout_test SOURCES AsyncTimeoutTest.cpp - TEST io_async_async_udp_socket_test APPLE_DISABLED WINDOWS_DISABLED - SOURCES AsyncUDPSocketTest.cpp - TEST io_async_delayed_destruction_test SOURCES DelayedDestructionTest.cpp - TEST io_async_delayed_destruction_base_test - SOURCES DelayedDestructionBaseTest.cpp - TEST io_async_destructor_check_test SOURCES DestructorCheckTest.cpp - # Fails with gtest macro error - BENCHMARK io_async_event_base_benchmark SOURCES EventBaseBenchmark.cpp - TEST io_async_event_base_test BROKEN SOURCES EventBaseTest.cpp - TEST io_async_event_base_local_test WINDOWS_DISABLED - SOURCES EventBaseLocalTest.cpp - TEST io_async_hh_wheel_timer_test SOURCES HHWheelTimerTest.cpp - TEST io_async_hh_wheel_timer_slow_tests SLOW - SOURCES HHWheelTimerSlowTests.cpp - TEST io_async_notification_queue_test WINDOWS_DISABLED - SOURCES NotificationQueueTest.cpp - BENCHMARK io_async_request_context_benchmark WINDOWS_DISABLED - SOURCES RequestContextBenchmark.cpp - HEADERS RequestContextHelper.h - TEST io_async_request_context_test WINDOWS_DISABLED - SOURCES RequestContextTest.cpp - TEST io_async_scoped_event_base_thread_test WINDOWS_DISABLED - SOURCES ScopedEventBaseThreadTest.cpp - TEST io_async_ssl_session_test - CONTENT_DIR certs/ - SOURCES SSLSessionTest.cpp - TEST io_async_write_chain_async_transport_wrapper_test - SOURCES WriteChainAsyncTransportWrapperTest.cpp - - DIRECTORY io/async/ssl/test/ - TEST io_async_ssl_ssl_errors_test SOURCES SSLErrorsTest.cpp - - DIRECTORY lang/test/ - TEST lang_align_test SOURCES AlignTest.cpp - TEST lang_aligned_test SOURCES AlignedTest.cpp - TEST lang_badge_test SOURCES BadgeTest.cpp - TEST lang_bits_class_test SOURCES BitsClassTest.cpp - TEST lang_bits_test SOURCES BitsTest.cpp - TEST lang_c_string_test SOURCES CStringTest.cpp - TEST lang_cast_test SOURCES CastTest.cpp - TEST lang_checked_math_test SOURCES CheckedMathTest.cpp - TEST lang_exception_test SOURCES ExceptionTest.cpp - TEST lang_extern_test SOURCES ExternTest.cpp - TEST lang_ordering_test SOURCES OrderingTest.cpp - TEST lang_pretty_test SOURCES PrettyTest.cpp - TEST lang_propagate_const_test SOURCES PropagateConstTest.cpp - TEST lang_r_value_reference_wrapper_test WINDOWS_DISABLED - SOURCES RValueReferenceWrapperTest.cpp - TEST lang_safe_assert_test SOURCES SafeAssertTest.cpp - TEST lang_switch_test SOURCES SwitchTest.cpp - BENCHMARK lang_to_ascii_benchmark SOURCES ToAsciiBench.cpp - TEST lang_to_ascii_test SOURCES ToAsciiTest.cpp - TEST lang_type_info_test SOURCES TypeInfoTest.cpp - - DIRECTORY memory/test/ - TEST memory_arena_test WINDOWS_DISABLED SOURCES ArenaTest.cpp - TEST memory_reentrant_allocator_test WINDOWS_DISABLED - SOURCES ReentrantAllocatorTest.cpp - TEST memory_shared_from_this_ptr_test - SOURCES shared_from_this_ptr_test.cpp - TEST memory_thread_cached_arena_test WINDOWS_DISABLED - SOURCES ThreadCachedArenaTest.cpp - TEST memory_mallctl_helper_test SOURCES MallctlHelperTest.cpp - TEST memory_uninitialized_memory_hacks_test - SOURCES UninitializedMemoryHacksTest.cpp - - DIRECTORY net/detail/test/ - TEST net_detail_socket_file_descriptor_map_test - SOURCES SocketFileDescriptorMapTest.cpp - - DIRECTORY portability/test/ - TEST portability_constexpr_test SOURCES ConstexprTest.cpp - TEST portability_filesystem_test SOURCES FilesystemTest.cpp - TEST portability_libgen_test SOURCES LibgenTest.cpp - TEST portability_openssl_portability_test - SOURCES OpenSSLPortabilityTest.cpp - TEST portability_pthread_test SOURCES PThreadTest.cpp - TEST portability_time_test WINDOWS_DISABLED - SOURCES TimeTest.cpp - - DIRECTORY ssl/test/ - TEST ssl_openssl_hash_test SOURCES OpenSSLHashTest.cpp - - DIRECTORY stats/test/ - TEST stats_buffered_stat_test SOURCES BufferedStatTest.cpp - BENCHMARK stats_digest_builder_benchmark - SOURCES DigestBuilderBenchmark.cpp - TEST stats_digest_builder_test SOURCES DigestBuilderTest.cpp - BENCHMARK stats_histogram_benchmark SOURCES HistogramBenchmark.cpp - TEST stats_histogram_test SOURCES HistogramTest.cpp - BENCHMARK stats_quantile_histogram_benchmark - SOURCES QuantileHistogramBenchmark.cpp - TEST stats_quantile_estimator_test SOURCES QuantileEstimatorTest.cpp - TEST stats_sliding_window_test SOURCES SlidingWindowTest.cpp - BENCHMARK stats_tdigest_benchmark SOURCES TDigestBenchmark.cpp - TEST stats_tdigest_test SOURCES TDigestTest.cpp - TEST stats_timeseries_histogram_test SOURCES TimeseriesHistogramTest.cpp - TEST stats_timeseries_test SOURCES TimeSeriesTest.cpp - - DIRECTORY synchronization/test/ - TEST synchronization_atomic_util_test SOURCES AtomicUtilTest.cpp - TEST synchronization_atomic_struct_test SOURCES AtomicStructTest.cpp - BENCHMARK synchronization_baton_benchmark SOURCES BatonBenchmark.cpp - TEST synchronization_baton_test SOURCES BatonTest.cpp - TEST synchronization_call_once_test SOURCES CallOnceTest.cpp - TEST synchronization_event_count_test SOURCES EventCountTest.cpp - BENCHMARK synchronization_hazptr_bench SOURCES HazptrBench.cpp - TEST synchronization_hazptr_test SOURCES HazptrTest.cpp - BENCHMARK synchronization_lifo_sem_bench WINDOWS_DISABLED - SOURCES LifoSemBench.cpp - TEST synchronization_lifo_sem_test WINDOWS_DISABLED - SOURCES LifoSemTests.cpp - TEST synchronization_relaxed_atomic_test WINDOWS_DISABLED - SOURCES RelaxedAtomicTest.cpp - TEST synchronization_rw_spin_lock_test SOURCES RWSpinLockTest.cpp - TEST synchronization_semaphore_test WINDOWS_DISABLED - SOURCES SemaphoreTest.cpp - BENCHMARK synchronization_small_locks_benchmark - SOURCES SmallLocksBenchmark.cpp - TEST synchronization_small_locks_test SOURCES SmallLocksTest.cpp - - DIRECTORY synchronization/detail/test/ - TEST synchronization_detail_inline_function_ref_test - SOURCES InlineFunctionRefTest.cpp - - DIRECTORY system/test/ - TEST system_at_fork_test WINDOWS_DISABLED SOURCES AtForkTest.cpp - TEST system_memory_mapping_test SOURCES MemoryMappingTest.cpp - TEST system_shell_test SOURCES ShellTest.cpp - #TEST system_subprocess_test SOURCES SubprocessTest.cpp - TEST system_thread_id_test SOURCES ThreadIdTest.cpp - TEST system_thread_name_test WINDOWS_DISABLED - SOURCES ThreadNameTest.cpp - - DIRECTORY test/ - TEST ahm_int_stress_test SOURCES AHMIntStressTest.cpp - TEST arena_smartptr_test SOURCES ArenaSmartPtrTest.cpp - BENCHMARK ascii_case_insensitive_benchmark - SOURCES AsciiCaseInsensitiveBenchmark.cpp - TEST ascii_check_test SOURCES AsciiCaseInsensitiveTest.cpp - TEST atomic_hash_array_test SOURCES AtomicHashArrayTest.cpp - TEST atomic_hash_map_test HANGING - SOURCES AtomicHashMapTest.cpp - TEST atomic_linked_list_test SOURCES AtomicLinkedListTest.cpp - TEST atomic_unordered_map_test SOURCES AtomicUnorderedMapTest.cpp - TEST base64_test SOURCES base64_test.cpp - TEST buffered_atomic_test SOURCES BufferedAtomicTest.cpp - TEST cancellation_token_test SOURCES CancellationTokenTest.cpp - TEST chrono_test SOURCES ChronoTest.cpp - TEST clock_gettime_wrappers_test SOURCES ClockGettimeWrappersTest.cpp - TEST concurrent_bit_set_test SOURCES ConcurrentBitSetTest.cpp - BENCHMARK concurrent_skip_list_benchmark - SOURCES ConcurrentSkipListBenchmark.cpp - TEST concurrent_skip_list_test SOURCES ConcurrentSkipListTest.cpp - # Builds but fails test on constexpr_exp_floating std::exp(471.L) - TEST constexpr_math_test WINDOWS_DISABLED - SOURCES ConstexprMathTest.cpp - TEST conv_test SOURCES ConvTest.cpp - TEST cpu_id_test SOURCES CpuIdTest.cpp - TEST demangle_test SOURCES DemangleTest.cpp - TEST deterministic_schedule_test SOURCES DeterministicScheduleTest.cpp - TEST discriminated_ptr_test SOURCES DiscriminatedPtrTest.cpp - TEST endian_test SOURCES EndianTest.cpp - TEST exception_string_test BROKEN SOURCES ExceptionStringTest.cpp - TEST exception_test SOURCES ExceptionTest.cpp - BENCHMARK exception_wrapper_benchmark WINDOWS_DISABLED - SOURCES ExceptionWrapperBenchmark.cpp - TEST exception_wrapper_test WINDOWS_DISABLED - SOURCES ExceptionWrapperTest.cpp - TEST expected_coroutines_test SOURCES ExpectedCoroutinesTest.cpp - TEST expected_test WINDOWS_DISABLED - SOURCES ExpectedTest.cpp - BENCHMARK fbstring_benchmark WINDOWS_DISABLED - SOURCES FBStringBenchmark.cpp - HEADERS FBStringTestBenchmarks.cpp.h - TEST fbstring_test WINDOWS_DISABLED SOURCES FBStringTest.cpp - TEST file_test SOURCES FileTest.cpp - # Open-source linux build can't handle running this. - #TEST file_lock_test SOURCES FileLockTest.cpp - TEST file_util_test SOURCES FileUtilTest.cpp - BENCHMARK fingerprint_benchmark SOURCES FingerprintBenchmark.cpp - TEST fingerprint_test SOURCES FingerprintTest.cpp - TEST fixed_string_test SOURCES FixedStringTest.cpp - TEST fmt_utility_test SOURCES FmtUtilityTest.cpp - TEST format_other_test SOURCES FormatOtherTest.cpp - BENCHMARK format_benchmark SOURCES FormatBenchmark.cpp - TEST format_test SOURCES FormatTest.cpp - TEST function_test BROKEN - SOURCES FunctionTest.cpp - BENCHMARK function_ref_benchmark SOURCES FunctionRefBenchmark.cpp - TEST function_ref_test SOURCES FunctionRefTest.cpp - TEST futex_test SOURCES FutexTest.cpp - TEST glog_test SOURCES GLogTest.cpp - TEST group_varint_test SOURCES GroupVarintTest.cpp - TEST group_varint_test_ssse3 SOURCES GroupVarintTest.cpp - TEST indestructible_test SOURCES IndestructibleTest.cpp - TEST indexed_mem_pool_test BROKEN - SOURCES IndexedMemPoolTest.cpp - TEST iterators_test SOURCES IteratorsTest.cpp - TEST lazy_test SOURCES LazyTest.cpp - TEST locks_test SOURCES SpinLockTest.cpp - TEST math_test SOURCES MathTest.cpp - BENCHMARK memcpy_benchmark WINDOWS_DISABLED SOURCES MemcpyBenchmark.cpp - TEST memcpy_test SOURCES MemcpyTest.cpp - TEST memory_idler_test SOURCES MemoryIdlerTest.cpp - TEST memory_test WINDOWS_DISABLED - SOURCES MemoryTest.cpp - BENCHMARK memset_benchmark WINDOWS_DISABLED SOURCES MemsetBenchmark.cpp - TEST move_wrapper_test SOURCES MoveWrapperTest.cpp - TEST mpmc_pipeline_test SOURCES MPMCPipelineTest.cpp - TEST mpmc_queue_test SLOW - SOURCES MPMCQueueTest.cpp - TEST network_address_test HANGING - SOURCES - IPAddressTest.cpp - MacAddressTest.cpp - SocketAddressTest.cpp - TEST optional_coroutines_test SOURCES OptionalCoroutinesTest.cpp - TEST optional_test SOURCES OptionalTest.cpp - TEST packed_sync_ptr_test HANGING - SOURCES PackedSyncPtrTest.cpp - TEST padded_test SOURCES PaddedTest.cpp - #TEST poly_test SOURCES PolyTest.cpp - TEST portability_test SOURCES PortabilityTest.cpp - # Turns out this benchmark uses Linux only API for setting CPU affinity i.e. cpu_set_t. - BENCHMARK producer_consumer_queue_benchmark APPLE_DISABLED WINDOWS_DISABLED - SOURCES ProducerConsumerQueueBenchmark.cpp - TEST producer_consumer_queue_test SLOW - SOURCES ProducerConsumerQueueTest.cpp - BENCHMARK range_find_benchmark SOURCES RangeFindBenchmark.cpp - BENCHMARK random_benchmark SOURCES RandomBenchmark.cpp - TEST random_test SOURCES RandomTest.cpp - TEST range_test SOURCES RangeTest.cpp - TEST replaceable_test WINDOWS_DISABLED SOURCES ReplaceableTest.cpp - TEST scope_guard_test WINDOWS_DISABLED SOURCES ScopeGuardTest.cpp - # Heavily dependent on drand and srand48 - #TEST shared_mutex_test SOURCES SharedMutexTest.cpp - # SingletonTest requires Subprocess - #TEST singleton_test SOURCES SingletonTest.cpp - TEST singleton_double_registration_test BROKEN SOURCES - SingletonDoubleRegistration.cpp - TEST singleton_test_global SOURCES SingletonTestGlobal.cpp - TEST singleton_thread_local_test BROKEN SOURCES - SingletonThreadLocalTest.cpp - SingletonThreadLocalTestOverload.cpp - TEST spin_lock_test SOURCES SpinLockTest.cpp - BENCHMARK string_benchmark WINDOWS_DISABLED SOURCES StringBenchmark.cpp - TEST string_test WINDOWS_DISABLED SOURCES StringTest.cpp - BENCHMARK string_to_float_benchmark SOURCES StringToFloatBenchmark.cpp - BENCHMARK synchronized_benchmark WINDOWS_DISABLED - SOURCES SynchronizedBenchmark.cpp - TEST synchronized_test WINDOWS_DISABLED - SOURCES SynchronizedTest.cpp - TEST thread_cached_int_test WINDOWS_DISABLED - SOURCES ThreadCachedIntTest.cpp - TEST thread_local_test WINDOWS_DISABLED SOURCES ThreadLocalTest.cpp - TEST timeout_queue_test SOURCES TimeoutQueueTest.cpp - TEST token_bucket_test SOURCES TokenBucketTest.cpp - TEST traits_test SOURCES TraitsTest.cpp - TEST try_test WINDOWS_DISABLED SOURCES TryTest.cpp - TEST unicode_test SOURCES UnicodeTest.cpp - TEST unit_test SOURCES UnitTest.cpp - BENCHMARK uri_benchmark SOURCES UriBenchmark.cpp - TEST uri_test SOURCES UriTest.cpp - TEST utf8_string_test SOURCES UTF8StringTest.cpp - TEST utility_test SOURCES UtilityTest.cpp - TEST varint_test SOURCES VarintTest.cpp - - DIRECTORY test/function_benchmark/ - BENCHMARK function_benchmark - SOURCES main.cpp benchmark_impl.cpp test_functions.cpp - - DIRECTORY testing/test/ - TEST testing_test_util_test SOURCES TestUtilTest.cpp - - DIRECTORY tracing/test/ - TEST static_tracepoint_section_test - SOURCES StaticTracepointSectionTest.cpp - - DIRECTORY json/test/ - TEST json_dynamic_converter_test SOURCES DynamicConverterTest.cpp - TEST json_dynamic_other_test SOURCES DynamicOtherTest.cpp - TEST json_dynamic_parser_test SOURCES DynamicParserTest.cpp - TEST json_dynamic_test SOURCES DynamicTest.cpp - # MSVC Preprocessor stringizing raw string literals bug - TEST json_json_test WINDOWS_DISABLED SOURCES JsonTest.cpp - BENCHMARK json_json_benchmark SOURCES JsonBenchmark.cpp - TEST json_json_other_test SOURCES JsonOtherTest.cpp - TEST json_json_patch_test SOURCES json_patch_test.cpp - TEST json_json_pointer_test SOURCES json_pointer_test.cpp - TEST json_json_schema_test SOURCES JSONSchemaTest.cpp - ) - - if (${LIBSODIUM_FOUND}) - folly_define_tests( - DIRECTORY crypto/test/ - TEST crypto_blake2xb_test SOURCES Blake2xbTest.cpp - BENCHMARK crypto_lt_hash_benchmark SOURCES LtHashBenchmark.cpp - TEST crypto_lt_hash_test SOURCES LtHashTest.cpp - ) - endif() - - if (${LIBAIO_FOUND}) - folly_define_tests( - DIRECTORY io/async/test/ - TEST io_async_async_io_test - SOURCES - AsyncIOTest.cpp - AsyncBaseTestLib.cpp - IoTestTempFileUtil.cpp - ) - endif() - - get_target_property(pic folly POSITION_INDEPENDENT_CODE) - if (pic) - add_library(singleton_thread_local_overload - SHARED ${FOLLY_DIR}/test/SingletonThreadLocalTestOverload.cpp) - apply_folly_compile_options_to_target(singleton_thread_local_overload) - set_target_properties(singleton_thread_local_overload PROPERTIES - PREFIX "" - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/folly/test - ) - target_link_libraries(singleton_thread_local_overload PRIVATE folly) - folly_define_tests( - DIRECTORY test/ - TEST singleton_thread_local_test SOURCES SingletonThreadLocalTest.cpp - ) - endif() endif() diff --git a/folly/algorithm/simd/detail/test/CMakeLists.txt b/folly/algorithm/simd/detail/test/CMakeLists.txt new file mode 100644 index 00000000000..28777b9d3b3 --- /dev/null +++ b/folly/algorithm/simd/detail/test/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/algorithm/simd/detail/test/ + +folly_define_tests( + DIRECTORY algorithm/simd/detail/test/ + TEST algorithm_simd_detail_simd_any_of_test SOURCES SimdAnyOfTest.cpp + TEST algorithm_simd_detail_simd_for_each_test SOURCES SimdForEachTest.cpp + TEST algorithm_simd_detail_simd_traits_test SOURCES TraitsTest.cpp + TEST algorithm_simd_detail_unroll_utils_test SOURCES UnrollUtilsTest.cpp +) diff --git a/folly/algorithm/simd/test/CMakeLists.txt b/folly/algorithm/simd/test/CMakeLists.txt new file mode 100644 index 00000000000..c2596dc9e19 --- /dev/null +++ b/folly/algorithm/simd/test/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/algorithm/simd/test/ + +folly_define_tests( + DIRECTORY algorithm/simd/test/ + TEST algorithm_simd_contains_test SOURCES ContainsTest.cpp + TEST algorithm_simd_find_first_of_test SOURCES find_first_of_test.cpp + TEST algorithm_simd_find_fixed_test SOURCES FindFixedTest.cpp + TEST algorithm_simd_movemask_test SOURCES MovemaskTest.cpp +) diff --git a/folly/chrono/test/CMakeLists.txt b/folly/chrono/test/CMakeLists.txt new file mode 100644 index 00000000000..e319ff4f1bb --- /dev/null +++ b/folly/chrono/test/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/chrono/test/ + +folly_define_tests( + DIRECTORY chrono/test/ + TEST chrono_conv_test WINDOWS_DISABLED + SOURCES ConvTest.cpp +) diff --git a/folly/cli/test/CMakeLists.txt b/folly/cli/test/CMakeLists.txt new file mode 100644 index 00000000000..feda1709bf8 --- /dev/null +++ b/folly/cli/test/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/cli/test/ + +folly_define_tests( + DIRECTORY cli/test/ + TEST cli_args_test SOURCES ArgsTest.cpp +) diff --git a/folly/codec/test/CMakeLists.txt b/folly/codec/test/CMakeLists.txt new file mode 100644 index 00000000000..534601e0554 --- /dev/null +++ b/folly/codec/test/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/codec/test/ + +folly_define_tests( + DIRECTORY codec/test/ + TEST codec_hex_test SOURCES hex_test.cpp + TEST codec_uuid_test SOURCES UuidTest.cpp +) diff --git a/folly/compression/elias_fano/test/CMakeLists.txt b/folly/compression/elias_fano/test/CMakeLists.txt new file mode 100644 index 00000000000..fb731003a3b --- /dev/null +++ b/folly/compression/elias_fano/test/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/compression/elias_fano/test/ + +folly_define_tests( + DIRECTORY compression/elias_fano/test/ + TEST compression_alias_fano_bit_vector_coding_test + SOURCES BitVectorCodingTest.cpp + TEST compression_alias_fano_elias_fano_test + SOURCES EliasFanoCodingTest.cpp +) diff --git a/folly/compression/test/CMakeLists.txt b/folly/compression/test/CMakeLists.txt new file mode 100644 index 00000000000..201c8143759 --- /dev/null +++ b/folly/compression/test/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/compression/test/ + +folly_define_tests( + DIRECTORY compression/test/ + TEST compression_compression_test SLOW SOURCES CompressionTest.cpp + TEST compression_quotient_multiset_test SOURCES QuotientMultiSetTest.cpp + TEST compression_select64_test SOURCES Select64Test.cpp +) diff --git a/folly/concurrency/container/test/CMakeLists.txt b/folly/concurrency/container/test/CMakeLists.txt new file mode 100644 index 00000000000..d062ba85d3e --- /dev/null +++ b/folly/concurrency/container/test/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/concurrency/container/test/ + +folly_define_tests( + DIRECTORY concurrency/container/test/ + TEST concurrency_container_lock_free_ring_buffer_test + SOURCES LockFreeRingBufferTest.cpp +) diff --git a/folly/concurrency/test/CMakeLists.txt b/folly/concurrency/test/CMakeLists.txt new file mode 100644 index 00000000000..057030020c6 --- /dev/null +++ b/folly/concurrency/test/CMakeLists.txt @@ -0,0 +1,39 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/concurrency/test/ + +folly_define_tests( + DIRECTORY concurrency/test/ + TEST concurrency_atomic_shared_ptr_test SOURCES AtomicSharedPtrTest.cpp + TEST concurrency_cache_locality_test WINDOWS_DISABLED + SOURCES CacheLocalityTest.cpp + TEST concurrency_core_cached_shared_ptr_test + SOURCES CoreCachedSharedPtrTest.cpp + BENCHMARK concurrency_concurrent_hash_map_bench WINDOWS_DISABLED + SOURCES ConcurrentHashMapBench.cpp + TEST concurrency_concurrent_hash_map_stress_test SLOW WINDOWS_DISABLED + SOURCES ConcurrentHashMapStressTest.cpp + TEST concurrency_concurrent_hash_map_test WINDOWS_DISABLED + SOURCES ConcurrentHashMapTest.cpp + TEST concurrency_dynamic_bounded_queue_test WINDOWS_DISABLED + SOURCES DynamicBoundedQueueTest.cpp + TEST concurrency_priority_unbounded_queue_set_test + SOURCES PriorityUnboundedQueueSetTest.cpp + BENCHMARK concurrency_thread_cached_synchronized_bench + SOURCES ThreadCachedSynchronizedBench.cpp + TEST concurrency_thread_cached_synchronized_test + SOURCES ThreadCachedSynchronizedTest.cpp + TEST concurrency_unbounded_queue_test SOURCES UnboundedQueueTest.cpp +) diff --git a/folly/container/test/CMakeLists.txt b/folly/container/test/CMakeLists.txt new file mode 100644 index 00000000000..9895c2ec976 --- /dev/null +++ b/folly/container/test/CMakeLists.txt @@ -0,0 +1,50 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/container/test/ + +folly_define_tests( + DIRECTORY container/test/ + TEST container_access_test SOURCES AccessTest.cpp + TEST container_array_test SOURCES ArrayTest.cpp + BENCHMARK container_bit_iterator_bench SOURCES BitIteratorBench.cpp + TEST container_bit_iterator_test SOURCES BitIteratorTest.cpp + TEST container_enumerate_test SOURCES EnumerateTest.cpp + BENCHMARK container_evicting_cache_map_bench + SOURCES EvictingCacheMapBench.cpp + TEST container_evicting_cache_map_test SOURCES EvictingCacheMapTest.cpp + TEST container_f14_fwd_test SOURCES F14FwdTest.cpp + TEST container_f14_map_test SOURCES F14MapTest.cpp + TEST container_f14_set_test SOURCES F14SetTest.cpp + BENCHMARK container_fbvector_benchmark + SOURCES FBVectorBenchmark.cpp + HEADERS FBVectorBenchmarks.cpp.h + TEST container_fbvector_test SOURCES FBVectorTest.cpp + BENCHMARK container_foreach_benchmark SOURCES ForeachBenchmark.cpp + TEST container_foreach_test SOURCES ForeachTest.cpp + BENCHMARK container_hash_maps_bench SOURCES HashMapsBench.cpp + TEST container_heap_vector_types_test SOURCES heap_vector_types_test.cpp + TEST container_map_util_test WINDOWS_DISABLED SOURCES MapUtilTest.cpp + TEST container_merge_test SOURCES MergeTest.cpp + TEST container_regex_match_cache_test SOURCES RegexMatchCacheTest.cpp + TEST container_small_vector_test WINDOWS_DISABLED + SOURCES small_vector_test.cpp + TEST container_sorted_vector_types_test SOURCES sorted_vector_test.cpp + TEST container_span_test SOURCES span_test.cpp + TEST container_std_bitset_test SOURCES StdBitsetTest.cpp + BENCHMARK container_sparse_byte_set_benchmark + SOURCES SparseByteSetBenchmark.cpp + TEST container_sparse_byte_set_test SOURCES SparseByteSetTest.cpp + TEST container_util_test SOURCES UtilTest.cpp +) diff --git a/folly/crypto/test/CMakeLists.txt b/folly/crypto/test/CMakeLists.txt new file mode 100644 index 00000000000..37637617114 --- /dev/null +++ b/folly/crypto/test/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/crypto/test/ + +if (${LIBSODIUM_FOUND}) + folly_define_tests( + DIRECTORY crypto/test/ + TEST crypto_blake2xb_test SOURCES Blake2xbTest.cpp + BENCHMARK crypto_lt_hash_benchmark SOURCES LtHashBenchmark.cpp + TEST crypto_lt_hash_test SOURCES LtHashTest.cpp + ) +endif() diff --git a/folly/detail/base64_detail/test/CMakeLists.txt b/folly/detail/base64_detail/test/CMakeLists.txt new file mode 100644 index 00000000000..df2942e5784 --- /dev/null +++ b/folly/detail/base64_detail/test/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/detail/base64_detail/test/ + +folly_define_tests( + DIRECTORY detail/base64_detail/test/ + TEST detail_base64_detail_test WINDOWS_DISABLED + SOURCES + Base64AgainstScalarTest.cpp + Base64PlatformTest.cpp + Base64SpecialCasesTest.cpp +) diff --git a/folly/detail/test/CMakeLists.txt b/folly/detail/test/CMakeLists.txt new file mode 100644 index 00000000000..f28586e55bc --- /dev/null +++ b/folly/detail/test/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/detail/test/ + +folly_define_tests( + DIRECTORY detail/test/ + TEST detail_simple_simd_string_utils_test + SOURCES SimpleSimdStringUtilsTest.cpp + TEST detail_split_string_simd_test WINDOWS_DISABLED + SOURCES SplitStringSimdTest.cpp + TEST detail_static_singleton_manager_test + SOURCES StaticSingletonManagerTest.cpp + TEST detail_type_list_test SOURCES TypeListTest.cpp +) diff --git a/folly/executors/task_queue/test/CMakeLists.txt b/folly/executors/task_queue/test/CMakeLists.txt new file mode 100644 index 00000000000..b9897c3bfe2 --- /dev/null +++ b/folly/executors/task_queue/test/CMakeLists.txt @@ -0,0 +1,34 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/executors/task_queue/test/ + +folly_define_tests( + DIRECTORY executors/task_queue/test/ + TEST executors_task_queue_priority_unbounded_blocking_queue_test + SOURCES PriorityUnboundedBlockingQueueTest.cpp + BENCHMARK executors_task_queue_unbounded_blocking_queue_bench + SOURCES UnboundedBlockingQueueBench.cpp + TEST executors_task_queue_unbounded_blocking_queue_test + SOURCES UnboundedBlockingQueueTest.cpp + + #DIRECTORY experimental/test/ + #TEST nested_command_line_app_test SOURCES NestedCommandLineAppTest.cpp + #TEST program_options_test SOURCES ProgramOptionsTest.cpp + # Depends on liburcu + #TEST read_mostly_shared_ptr_test SOURCES ReadMostlySharedPtrTest.cpp + #TEST ref_count_test SOURCES RefCountTest.cpp + + #DIRECTORY experimental/io/test/ +) diff --git a/folly/executors/test/CMakeLists.txt b/folly/executors/test/CMakeLists.txt new file mode 100644 index 00000000000..bc7b034a7c9 --- /dev/null +++ b/folly/executors/test/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/executors/test/ + +folly_define_tests( + DIRECTORY executors/test/ + TEST executors_async_helpers_test SOURCES AsyncTest.cpp + TEST executors_codel_test WINDOWS_DISABLED SOURCES CodelTest.cpp + BENCHMARK executors_edf_thread_pool_executor_benchmark + SOURCES EDFThreadPoolExecutorBenchmark.cpp + TEST executors_executor_test SOURCES ExecutorTest.cpp + TEST executors_fiber_io_executor_test SOURCES FiberIOExecutorTest.cpp + # FunctionSchedulerTest has a lot of timing-dependent checks, + # and tends to fail on heavily loaded systems. + TEST executors_function_scheduler_test BROKEN + SOURCES FunctionSchedulerTest.cpp + TEST executors_global_executor_test SOURCES GlobalExecutorTest.cpp + TEST executors_serial_executor_test SOURCES SerialExecutorTest.cpp + # Fails in ThreadPoolExecutorTest.RequestContext:719 data2 != nullptr + TEST executors_thread_pool_executor_test BROKEN WINDOWS_DISABLED + SOURCES ThreadPoolExecutorTest.cpp + TEST executors_threaded_executor_test SOURCES ThreadedExecutorTest.cpp + TEST executors_timed_drivable_executor_test + SOURCES TimedDrivableExecutorTest.cpp +) diff --git a/folly/external/farmhash/test/CMakeLists.txt b/folly/external/farmhash/test/CMakeLists.txt new file mode 100644 index 00000000000..741fcd39b19 --- /dev/null +++ b/folly/external/farmhash/test/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/external/farmhash/test/ + +folly_define_tests( + DIRECTORY external/farmhash/test/ + TEST external_farmhash_farmhash_test SOURCES farmhash_test.cpp +) diff --git a/folly/fibers/test/CMakeLists.txt b/folly/fibers/test/CMakeLists.txt new file mode 100644 index 00000000000..7f13fb9093b --- /dev/null +++ b/folly/fibers/test/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/fibers/test/ + +folly_define_tests( + DIRECTORY fibers/test/ + # FiberManager swapWithException fails with segfault + BENCHMARK fibers_fibers_benchmark WINDOWS_DISABLED + SOURCES FibersBenchmark.cpp + TEST fibers_fibers_test BROKEN SOURCES FibersTest.cpp +) diff --git a/folly/functional/test/CMakeLists.txt b/folly/functional/test/CMakeLists.txt new file mode 100644 index 00000000000..92d2765f4c5 --- /dev/null +++ b/folly/functional/test/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/functional/test/ + +folly_define_tests( + DIRECTORY functional/test/ + TEST functional_apply_tuple_test WINDOWS_DISABLED + SOURCES ApplyTupleTest.cpp + TEST functional_invoke_test WINDOWS_DISABLED + SOURCES InvokeTest.cpp + TEST functional_partial_test SOURCES PartialTest.cpp + TEST functional_protocol_test SOURCES protocol_test.cpp + TEST functional_traits_test SOURCES traits_test.cpp +) diff --git a/folly/futures/test/CMakeLists.txt b/folly/futures/test/CMakeLists.txt new file mode 100644 index 00000000000..e15349e6d1a --- /dev/null +++ b/folly/futures/test/CMakeLists.txt @@ -0,0 +1,58 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/futures/test/ + +folly_define_tests( + DIRECTORY futures/test/ + TEST futures_barrier_test SOURCES BarrierTest.cpp + TEST futures_callback_lifetime_test SOURCES CallbackLifetimeTest.cpp + TEST futures_collect_test SOURCES CollectTest.cpp + TEST futures_context_test SOURCES ContextTest.cpp + TEST futures_core_test SOURCES CoreTest.cpp + TEST futures_ensure_test SOURCES EnsureTest.cpp + TEST futures_filter_test SOURCES FilterTest.cpp + TEST futures_future_splitter_test SOURCES FutureSplitterTest.cpp + BENCHMARK futures_benchmark WINDOWS_DISABLED + SOURCES Benchmark.cpp + TEST futures_future_test WINDOWS_DISABLED + SOURCES FutureTest.cpp + TEST futures_header_compile_test SOURCES HeaderCompileTest.cpp + TEST futures_interrupt_test SOURCES InterruptTest.cpp + TEST futures_map_test SOURCES MapTest.cpp + TEST futures_non_copyable_lambda_test SOURCES NonCopyableLambdaTest.cpp + TEST futures_poll_test SOURCES PollTest.cpp + TEST futures_promise_test SOURCES PromiseTest.cpp + TEST futures_reduce_test SOURCES ReduceTest.cpp + TEST futures_retrying_test SOURCES RetryingTest.cpp + TEST futures_self_destruct_test SOURCES SelfDestructTest.cpp + TEST futures_shared_promise_test SOURCES SharedPromiseTest.cpp + TEST futures_test_executor_test SOURCES TestExecutorTest.cpp + TEST futures_then_compile_test + HEADERS + ThenCompileTest.h + SOURCES + ThenCompileTest.cpp + TEST futures_then_test SOURCES ThenTest.cpp + TEST futures_timekeeper_test WINDOWS_DISABLED SOURCES TimekeeperTest.cpp + TEST futures_times_test SOURCES TimesTest.cpp + TEST futures_unwrap_test SOURCES UnwrapTest.cpp + TEST futures_via_test SOURCES ViaTest.cpp + TEST futures_wait_test SOURCES WaitTest.cpp + TEST futures_when_test SOURCES WhenTest.cpp + TEST futures_while_do_test SOURCES WhileDoTest.cpp + TEST futures_will_equal_test SOURCES WillEqualTest.cpp + TEST futures_window_test WINDOWS_DISABLED + SOURCES WindowTest.cpp +) diff --git a/folly/gen/test/CMakeLists.txt b/folly/gen/test/CMakeLists.txt new file mode 100644 index 00000000000..c3a22a83c81 --- /dev/null +++ b/folly/gen/test/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/gen/test/ + +folly_define_tests( + DIRECTORY gen/test/ + # MSVC bug can't resolve initializer_list constructor properly + TEST gen_base_test WINDOWS_DISABLED SOURCES BaseTest.cpp + TEST gen_combine_test SOURCES CombineTest.cpp + BENCHMARK gen_parallel_map_benchmark SOURCES ParallelMapBenchmark.cpp + TEST gen_parallel_map_test SOURCES ParallelMapTest.cpp + BENCHMARK gen_parallel_benchmark SOURCES ParallelBenchmark.cpp + TEST gen_parallel_test SOURCES ParallelTest.cpp +) diff --git a/folly/hash/test/CMakeLists.txt b/folly/hash/test/CMakeLists.txt new file mode 100644 index 00000000000..07d2230316a --- /dev/null +++ b/folly/hash/test/CMakeLists.txt @@ -0,0 +1,32 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/hash/test/ + +folly_define_tests( + DIRECTORY hash/test/ + BENCHMARK hash_checksum_benchmark SOURCES ChecksumBenchmark.cpp + # builds, but tests fail on MSVC cmake build + TEST hash_checksum_test WINDOWS_DISABLED + SOURCES ChecksumTest.cpp + TEST hash_farm_hash_test SOURCES FarmHashTest.cpp + BENCHMARK hash_hash_benchmark WINDOWS_DISABLED + SOURCES HashBenchmark.cpp + TEST hash_hash_test WINDOWS_DISABLED + SOURCES HashTest.cpp + TEST hash_spooky_hash_v1_test SOURCES SpookyHashV1Test.cpp + TEST hash_spooky_hash_v2_test SOURCES SpookyHashV2Test.cpp + TEST hash_traits_test SOURCES traits_test.cpp + TEST hash_unique_hash_key_test SOURCES UniqueHashKeyTest.cpp +) diff --git a/folly/io/async/ssl/test/CMakeLists.txt b/folly/io/async/ssl/test/CMakeLists.txt new file mode 100644 index 00000000000..20e0cd86357 --- /dev/null +++ b/folly/io/async/ssl/test/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/io/async/ssl/test/ + +folly_define_tests( + DIRECTORY io/async/ssl/test/ + TEST io_async_ssl_ssl_errors_test SOURCES SSLErrorsTest.cpp +) diff --git a/folly/io/async/test/CMakeLists.txt b/folly/io/async/test/CMakeLists.txt new file mode 100644 index 00000000000..3193b817948 --- /dev/null +++ b/folly/io/async/test/CMakeLists.txt @@ -0,0 +1,81 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/io/async/test/ + +folly_define_tests( + DIRECTORY io/async/test/ + # A number of tests in the async_test binary are unfortunately flaky. + # When run under Travis CI a number of the tests also hang (it looks + # like they do not get expected socket accept events, causing them + # to never break out of their event loops). + TEST io_async_async_test BROKEN + CONTENT_DIR certs/ + HEADERS + AsyncSocketTest.h + AsyncSSLSocketTest.h + SOURCES + AsyncPipeTest.cpp + AsyncSocketExceptionTest.cpp + AsyncSocketTest.cpp + AsyncSocketTest2.cpp + AsyncSSLSocketTest.cpp + AsyncSSLSocketTest2.cpp + AsyncSSLSocketWriteTest.cpp + AsyncTransportTest.cpp + # This is disabled because it depends on things that don't exist + # on Windows. + # TODO: Refactor EventHandlerTest to not use eventfd so it can work on Mac OS X. + #TEST io_async_event_handler_test WINDOWS_DISABLED SOURCES EventHandlerTest.cpp + TEST io_async_async_timeout_test SOURCES AsyncTimeoutTest.cpp + TEST io_async_async_udp_socket_test APPLE_DISABLED WINDOWS_DISABLED + SOURCES AsyncUDPSocketTest.cpp + TEST io_async_delayed_destruction_test SOURCES DelayedDestructionTest.cpp + TEST io_async_delayed_destruction_base_test + SOURCES DelayedDestructionBaseTest.cpp + TEST io_async_destructor_check_test SOURCES DestructorCheckTest.cpp + # Fails with gtest macro error + BENCHMARK io_async_event_base_benchmark SOURCES EventBaseBenchmark.cpp + TEST io_async_event_base_test BROKEN SOURCES EventBaseTest.cpp + TEST io_async_event_base_local_test WINDOWS_DISABLED + SOURCES EventBaseLocalTest.cpp + TEST io_async_hh_wheel_timer_test SOURCES HHWheelTimerTest.cpp + TEST io_async_hh_wheel_timer_slow_tests SLOW + SOURCES HHWheelTimerSlowTests.cpp + TEST io_async_notification_queue_test WINDOWS_DISABLED + SOURCES NotificationQueueTest.cpp + BENCHMARK io_async_request_context_benchmark WINDOWS_DISABLED + SOURCES RequestContextBenchmark.cpp + HEADERS RequestContextHelper.h + TEST io_async_request_context_test WINDOWS_DISABLED + SOURCES RequestContextTest.cpp + TEST io_async_scoped_event_base_thread_test WINDOWS_DISABLED + SOURCES ScopedEventBaseThreadTest.cpp + TEST io_async_ssl_session_test + CONTENT_DIR certs/ + SOURCES SSLSessionTest.cpp + TEST io_async_write_chain_async_transport_wrapper_test + SOURCES WriteChainAsyncTransportWrapperTest.cpp +) + +if (${LIBAIO_FOUND}) + folly_define_tests( + DIRECTORY io/async/test/ + TEST io_async_async_io_test + SOURCES + AsyncIOTest.cpp + AsyncBaseTestLib.cpp + IoTestTempFileUtil.cpp + ) +endif() diff --git a/folly/io/test/CMakeLists.txt b/folly/io/test/CMakeLists.txt new file mode 100644 index 00000000000..e701702ecfd --- /dev/null +++ b/folly/io/test/CMakeLists.txt @@ -0,0 +1,29 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/io/test/ + +folly_define_tests( + DIRECTORY io/test/ + TEST io_fs_util_test SOURCES FsUtilTest.cpp + BENCHMARK io_iobuf_benchmark WINDOWS_DISABLED SOURCES IOBufBenchmark.cpp + TEST io_iobuf_test WINDOWS_DISABLED SOURCES IOBufTest.cpp + TEST io_iobuf_cursor_test SOURCES IOBufCursorTest.cpp + TEST io_iobuf_queue_test SOURCES IOBufQueueTest.cpp + TEST io_record_io_test WINDOWS_DISABLED SOURCES RecordIOTest.cpp + TEST io_shutdown_socket_set_test HANGING + SOURCES ShutdownSocketSetTest.cpp + TEST io_socket_option_value_test HANGING + SOURCES SocketOptionValueTest.cpp +) diff --git a/folly/json/test/CMakeLists.txt b/folly/json/test/CMakeLists.txt new file mode 100644 index 00000000000..680a798f2c2 --- /dev/null +++ b/folly/json/test/CMakeLists.txt @@ -0,0 +1,30 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/json/test/ + +folly_define_tests( + DIRECTORY json/test/ + TEST json_dynamic_converter_test SOURCES DynamicConverterTest.cpp + TEST json_dynamic_other_test SOURCES DynamicOtherTest.cpp + TEST json_dynamic_parser_test SOURCES DynamicParserTest.cpp + TEST json_dynamic_test SOURCES DynamicTest.cpp + # MSVC Preprocessor stringizing raw string literals bug + TEST json_json_test WINDOWS_DISABLED SOURCES JsonTest.cpp + BENCHMARK json_json_benchmark SOURCES JsonBenchmark.cpp + TEST json_json_other_test SOURCES JsonOtherTest.cpp + TEST json_json_patch_test SOURCES json_patch_test.cpp + TEST json_json_pointer_test SOURCES json_pointer_test.cpp + TEST json_json_schema_test SOURCES JSONSchemaTest.cpp +) diff --git a/folly/lang/test/CMakeLists.txt b/folly/lang/test/CMakeLists.txt new file mode 100644 index 00000000000..012da1489b9 --- /dev/null +++ b/folly/lang/test/CMakeLists.txt @@ -0,0 +1,39 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/lang/test/ + +folly_define_tests( + DIRECTORY lang/test/ + TEST lang_align_test SOURCES AlignTest.cpp + TEST lang_aligned_test SOURCES AlignedTest.cpp + TEST lang_badge_test SOURCES BadgeTest.cpp + TEST lang_bits_class_test SOURCES BitsClassTest.cpp + TEST lang_bits_test SOURCES BitsTest.cpp + TEST lang_c_string_test SOURCES CStringTest.cpp + TEST lang_cast_test SOURCES CastTest.cpp + TEST lang_checked_math_test SOURCES CheckedMathTest.cpp + TEST lang_exception_test SOURCES ExceptionTest.cpp + TEST lang_extern_test SOURCES ExternTest.cpp + TEST lang_ordering_test SOURCES OrderingTest.cpp + TEST lang_pretty_test SOURCES PrettyTest.cpp + TEST lang_propagate_const_test SOURCES PropagateConstTest.cpp + TEST lang_r_value_reference_wrapper_test WINDOWS_DISABLED + SOURCES RValueReferenceWrapperTest.cpp + TEST lang_safe_assert_test SOURCES SafeAssertTest.cpp + TEST lang_switch_test SOURCES SwitchTest.cpp + BENCHMARK lang_to_ascii_benchmark SOURCES ToAsciiBench.cpp + TEST lang_to_ascii_test SOURCES ToAsciiTest.cpp + TEST lang_type_info_test SOURCES TypeInfoTest.cpp +) diff --git a/folly/logging/test/CMakeLists.txt b/folly/logging/test/CMakeLists.txt new file mode 100644 index 00000000000..068287b2054 --- /dev/null +++ b/folly/logging/test/CMakeLists.txt @@ -0,0 +1,46 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/logging/test/ + +folly_define_tests( + DIRECTORY logging/test/ + TEST logging_async_file_writer_test WINDOWS_DISABLED + SOURCES AsyncFileWriterTest.cpp + TEST logging_autotimer_test SOURCES AutoTimerTest.cpp + TEST logging_config_parser_test SOURCES ConfigParserTest.cpp + TEST logging_config_update_test SOURCES ConfigUpdateTest.cpp + TEST logging_file_handler_factory_test WINDOWS_DISABLED + SOURCES FileHandlerFactoryTest.cpp + TEST logging_glog_formatter_test SOURCES GlogFormatterTest.cpp + TEST logging_immediate_file_writer_test + SOURCES ImmediateFileWriterTest.cpp + TEST logging_log_category_test SOURCES LogCategoryTest.cpp + TEST logging_logger_db_test SOURCES LoggerDBTest.cpp + TEST logging_logger_test WINDOWS_DISABLED SOURCES LoggerTest.cpp + TEST logging_log_level_test SOURCES LogLevelTest.cpp + TEST logging_log_message_test SOURCES LogMessageTest.cpp + TEST logging_log_name_test SOURCES LogNameTest.cpp + TEST logging_log_stream_test SOURCES LogStreamTest.cpp + TEST logging_rate_limiter_test SOURCES RateLimiterTest.cpp + TEST logging_standard_log_handler_test SOURCES StandardLogHandlerTest.cpp + TEST logging_xlog_test WINDOWS_DISABLED + HEADERS + XlogHeader1.h + XlogHeader2.h + SOURCES + XlogFile1.cpp + XlogFile2.cpp + XlogTest.cpp +) diff --git a/folly/memory/test/CMakeLists.txt b/folly/memory/test/CMakeLists.txt new file mode 100644 index 00000000000..77d379db9b0 --- /dev/null +++ b/folly/memory/test/CMakeLists.txt @@ -0,0 +1,29 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/memory/test/ + +folly_define_tests( + DIRECTORY memory/test/ + TEST memory_arena_test WINDOWS_DISABLED SOURCES ArenaTest.cpp + TEST memory_reentrant_allocator_test WINDOWS_DISABLED + SOURCES ReentrantAllocatorTest.cpp + TEST memory_shared_from_this_ptr_test + SOURCES shared_from_this_ptr_test.cpp + TEST memory_thread_cached_arena_test WINDOWS_DISABLED + SOURCES ThreadCachedArenaTest.cpp + TEST memory_mallctl_helper_test SOURCES MallctlHelperTest.cpp + TEST memory_uninitialized_memory_hacks_test + SOURCES UninitializedMemoryHacksTest.cpp +) diff --git a/folly/net/detail/test/CMakeLists.txt b/folly/net/detail/test/CMakeLists.txt new file mode 100644 index 00000000000..6612c1c552c --- /dev/null +++ b/folly/net/detail/test/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/net/detail/test/ + +folly_define_tests( + DIRECTORY net/detail/test/ + TEST net_detail_socket_file_descriptor_map_test + SOURCES SocketFileDescriptorMapTest.cpp +) diff --git a/folly/portability/test/CMakeLists.txt b/folly/portability/test/CMakeLists.txt new file mode 100644 index 00000000000..e22b36e2cb4 --- /dev/null +++ b/folly/portability/test/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/portability/test/ + +folly_define_tests( + DIRECTORY portability/test/ + TEST portability_constexpr_test SOURCES ConstexprTest.cpp + TEST portability_filesystem_test SOURCES FilesystemTest.cpp + TEST portability_libgen_test SOURCES LibgenTest.cpp + TEST portability_openssl_portability_test + SOURCES OpenSSLPortabilityTest.cpp + TEST portability_pthread_test SOURCES PThreadTest.cpp + TEST portability_time_test WINDOWS_DISABLED + SOURCES TimeTest.cpp +) diff --git a/folly/ssl/test/CMakeLists.txt b/folly/ssl/test/CMakeLists.txt new file mode 100644 index 00000000000..3f2a16f06c0 --- /dev/null +++ b/folly/ssl/test/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/ssl/test/ + +folly_define_tests( + DIRECTORY ssl/test/ + TEST ssl_openssl_hash_test SOURCES OpenSSLHashTest.cpp +) diff --git a/folly/stats/test/CMakeLists.txt b/folly/stats/test/CMakeLists.txt new file mode 100644 index 00000000000..8a9037457da --- /dev/null +++ b/folly/stats/test/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/stats/test/ + +folly_define_tests( + DIRECTORY stats/test/ + TEST stats_buffered_stat_test SOURCES BufferedStatTest.cpp + BENCHMARK stats_digest_builder_benchmark + SOURCES DigestBuilderBenchmark.cpp + TEST stats_digest_builder_test SOURCES DigestBuilderTest.cpp + BENCHMARK stats_histogram_benchmark SOURCES HistogramBenchmark.cpp + TEST stats_histogram_test SOURCES HistogramTest.cpp + BENCHMARK stats_quantile_histogram_benchmark + SOURCES QuantileHistogramBenchmark.cpp + TEST stats_quantile_estimator_test SOURCES QuantileEstimatorTest.cpp + TEST stats_sliding_window_test SOURCES SlidingWindowTest.cpp + BENCHMARK stats_tdigest_benchmark SOURCES TDigestBenchmark.cpp + TEST stats_tdigest_test SOURCES TDigestTest.cpp + TEST stats_timeseries_histogram_test SOURCES TimeseriesHistogramTest.cpp + TEST stats_timeseries_test SOURCES TimeSeriesTest.cpp +) diff --git a/folly/synchronization/detail/test/CMakeLists.txt b/folly/synchronization/detail/test/CMakeLists.txt new file mode 100644 index 00000000000..4f0c069706c --- /dev/null +++ b/folly/synchronization/detail/test/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/synchronization/detail/test/ + +folly_define_tests( + DIRECTORY synchronization/detail/test/ + TEST synchronization_detail_inline_function_ref_test + SOURCES InlineFunctionRefTest.cpp +) diff --git a/folly/synchronization/test/CMakeLists.txt b/folly/synchronization/test/CMakeLists.txt new file mode 100644 index 00000000000..d43079df37a --- /dev/null +++ b/folly/synchronization/test/CMakeLists.txt @@ -0,0 +1,39 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/synchronization/test/ + +folly_define_tests( + DIRECTORY synchronization/test/ + TEST synchronization_atomic_util_test SOURCES AtomicUtilTest.cpp + TEST synchronization_atomic_struct_test SOURCES AtomicStructTest.cpp + BENCHMARK synchronization_baton_benchmark SOURCES BatonBenchmark.cpp + TEST synchronization_baton_test SOURCES BatonTest.cpp + TEST synchronization_call_once_test SOURCES CallOnceTest.cpp + TEST synchronization_event_count_test SOURCES EventCountTest.cpp + BENCHMARK synchronization_hazptr_bench SOURCES HazptrBench.cpp + TEST synchronization_hazptr_test SOURCES HazptrTest.cpp + BENCHMARK synchronization_lifo_sem_bench WINDOWS_DISABLED + SOURCES LifoSemBench.cpp + TEST synchronization_lifo_sem_test WINDOWS_DISABLED + SOURCES LifoSemTests.cpp + TEST synchronization_relaxed_atomic_test WINDOWS_DISABLED + SOURCES RelaxedAtomicTest.cpp + TEST synchronization_rw_spin_lock_test SOURCES RWSpinLockTest.cpp + TEST synchronization_semaphore_test WINDOWS_DISABLED + SOURCES SemaphoreTest.cpp + BENCHMARK synchronization_small_locks_benchmark + SOURCES SmallLocksBenchmark.cpp + TEST synchronization_small_locks_test SOURCES SmallLocksTest.cpp +) diff --git a/folly/system/test/CMakeLists.txt b/folly/system/test/CMakeLists.txt new file mode 100644 index 00000000000..44448a14a43 --- /dev/null +++ b/folly/system/test/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/system/test/ + +folly_define_tests( + DIRECTORY system/test/ + TEST system_at_fork_test WINDOWS_DISABLED SOURCES AtForkTest.cpp + TEST system_memory_mapping_test SOURCES MemoryMappingTest.cpp + TEST system_shell_test SOURCES ShellTest.cpp + #TEST system_subprocess_test SOURCES SubprocessTest.cpp + TEST system_thread_id_test SOURCES ThreadIdTest.cpp + TEST system_thread_name_test WINDOWS_DISABLED + SOURCES ThreadNameTest.cpp +) diff --git a/folly/test/CMakeLists.txt b/folly/test/CMakeLists.txt new file mode 100644 index 00000000000..baa2020da08 --- /dev/null +++ b/folly/test/CMakeLists.txt @@ -0,0 +1,173 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/test/ + +folly_define_tests( + DIRECTORY test/ + TEST ahm_int_stress_test SOURCES AHMIntStressTest.cpp + TEST arena_smartptr_test SOURCES ArenaSmartPtrTest.cpp + BENCHMARK ascii_case_insensitive_benchmark + SOURCES AsciiCaseInsensitiveBenchmark.cpp + TEST ascii_check_test SOURCES AsciiCaseInsensitiveTest.cpp + TEST atomic_hash_array_test SOURCES AtomicHashArrayTest.cpp + TEST atomic_hash_map_test HANGING + SOURCES AtomicHashMapTest.cpp + TEST atomic_linked_list_test SOURCES AtomicLinkedListTest.cpp + TEST atomic_unordered_map_test SOURCES AtomicUnorderedMapTest.cpp + TEST base64_test SOURCES base64_test.cpp + TEST buffered_atomic_test SOURCES BufferedAtomicTest.cpp + TEST cancellation_token_test SOURCES CancellationTokenTest.cpp + TEST chrono_test SOURCES ChronoTest.cpp + TEST clock_gettime_wrappers_test SOURCES ClockGettimeWrappersTest.cpp + TEST concurrent_bit_set_test SOURCES ConcurrentBitSetTest.cpp + BENCHMARK concurrent_skip_list_benchmark + SOURCES ConcurrentSkipListBenchmark.cpp + TEST concurrent_skip_list_test SOURCES ConcurrentSkipListTest.cpp + # Builds but fails test on constexpr_exp_floating std::exp(471.L) + TEST constexpr_math_test WINDOWS_DISABLED + SOURCES ConstexprMathTest.cpp + TEST conv_test SOURCES ConvTest.cpp + TEST cpu_id_test SOURCES CpuIdTest.cpp + TEST demangle_test SOURCES DemangleTest.cpp + TEST deterministic_schedule_test SOURCES DeterministicScheduleTest.cpp + TEST discriminated_ptr_test SOURCES DiscriminatedPtrTest.cpp + TEST endian_test SOURCES EndianTest.cpp + TEST exception_string_test BROKEN SOURCES ExceptionStringTest.cpp + TEST exception_test SOURCES ExceptionTest.cpp + BENCHMARK exception_wrapper_benchmark WINDOWS_DISABLED + SOURCES ExceptionWrapperBenchmark.cpp + TEST exception_wrapper_test WINDOWS_DISABLED + SOURCES ExceptionWrapperTest.cpp + TEST expected_coroutines_test SOURCES ExpectedCoroutinesTest.cpp + TEST expected_test WINDOWS_DISABLED + SOURCES ExpectedTest.cpp + BENCHMARK fbstring_benchmark WINDOWS_DISABLED + SOURCES FBStringBenchmark.cpp + HEADERS FBStringTestBenchmarks.cpp.h + TEST fbstring_test WINDOWS_DISABLED SOURCES FBStringTest.cpp + TEST file_test SOURCES FileTest.cpp + # Open-source linux build can't handle running this. + #TEST file_lock_test SOURCES FileLockTest.cpp + TEST file_util_test SOURCES FileUtilTest.cpp + BENCHMARK fingerprint_benchmark SOURCES FingerprintBenchmark.cpp + TEST fingerprint_test SOURCES FingerprintTest.cpp + TEST fixed_string_test SOURCES FixedStringTest.cpp + TEST fmt_utility_test SOURCES FmtUtilityTest.cpp + TEST format_other_test SOURCES FormatOtherTest.cpp + BENCHMARK format_benchmark SOURCES FormatBenchmark.cpp + TEST format_test SOURCES FormatTest.cpp + TEST function_test BROKEN + SOURCES FunctionTest.cpp + BENCHMARK function_ref_benchmark SOURCES FunctionRefBenchmark.cpp + TEST function_ref_test SOURCES FunctionRefTest.cpp + TEST futex_test SOURCES FutexTest.cpp + TEST glog_test SOURCES GLogTest.cpp + TEST group_varint_test SOURCES GroupVarintTest.cpp + TEST group_varint_test_ssse3 SOURCES GroupVarintTest.cpp + TEST indestructible_test SOURCES IndestructibleTest.cpp + TEST indexed_mem_pool_test BROKEN + SOURCES IndexedMemPoolTest.cpp + TEST iterators_test SOURCES IteratorsTest.cpp + TEST lazy_test SOURCES LazyTest.cpp + TEST locks_test SOURCES SpinLockTest.cpp + TEST math_test SOURCES MathTest.cpp + BENCHMARK memcpy_benchmark WINDOWS_DISABLED SOURCES MemcpyBenchmark.cpp + TEST memcpy_test SOURCES MemcpyTest.cpp + TEST memory_idler_test SOURCES MemoryIdlerTest.cpp + TEST memory_test WINDOWS_DISABLED + SOURCES MemoryTest.cpp + BENCHMARK memset_benchmark WINDOWS_DISABLED SOURCES MemsetBenchmark.cpp + TEST move_wrapper_test SOURCES MoveWrapperTest.cpp + TEST mpmc_pipeline_test SOURCES MPMCPipelineTest.cpp + TEST mpmc_queue_test SLOW + SOURCES MPMCQueueTest.cpp + TEST network_address_test HANGING + SOURCES + IPAddressTest.cpp + MacAddressTest.cpp + SocketAddressTest.cpp + TEST optional_coroutines_test SOURCES OptionalCoroutinesTest.cpp + TEST optional_test SOURCES OptionalTest.cpp + TEST packed_sync_ptr_test HANGING + SOURCES PackedSyncPtrTest.cpp + TEST padded_test SOURCES PaddedTest.cpp + #TEST poly_test SOURCES PolyTest.cpp + TEST portability_test SOURCES PortabilityTest.cpp + # Turns out this benchmark uses Linux only API for setting CPU affinity i.e. cpu_set_t. + BENCHMARK producer_consumer_queue_benchmark APPLE_DISABLED WINDOWS_DISABLED + SOURCES ProducerConsumerQueueBenchmark.cpp + TEST producer_consumer_queue_test SLOW + SOURCES ProducerConsumerQueueTest.cpp + BENCHMARK range_find_benchmark SOURCES RangeFindBenchmark.cpp + BENCHMARK random_benchmark SOURCES RandomBenchmark.cpp + TEST random_test SOURCES RandomTest.cpp + TEST range_test SOURCES RangeTest.cpp + TEST replaceable_test WINDOWS_DISABLED SOURCES ReplaceableTest.cpp + TEST scope_guard_test WINDOWS_DISABLED SOURCES ScopeGuardTest.cpp + # Heavily dependent on drand and srand48 + #TEST shared_mutex_test SOURCES SharedMutexTest.cpp + # SingletonTest requires Subprocess + #TEST singleton_test SOURCES SingletonTest.cpp + TEST singleton_double_registration_test BROKEN SOURCES + SingletonDoubleRegistration.cpp + TEST singleton_test_global SOURCES SingletonTestGlobal.cpp + TEST singleton_thread_local_test BROKEN SOURCES + SingletonThreadLocalTest.cpp + SingletonThreadLocalTestOverload.cpp + TEST spin_lock_test SOURCES SpinLockTest.cpp + BENCHMARK string_benchmark WINDOWS_DISABLED SOURCES StringBenchmark.cpp + TEST string_test WINDOWS_DISABLED SOURCES StringTest.cpp + BENCHMARK string_to_float_benchmark SOURCES StringToFloatBenchmark.cpp + BENCHMARK synchronized_benchmark WINDOWS_DISABLED + SOURCES SynchronizedBenchmark.cpp + TEST synchronized_test WINDOWS_DISABLED + SOURCES SynchronizedTest.cpp + TEST thread_cached_int_test WINDOWS_DISABLED + SOURCES ThreadCachedIntTest.cpp + TEST thread_local_test WINDOWS_DISABLED SOURCES ThreadLocalTest.cpp + TEST timeout_queue_test SOURCES TimeoutQueueTest.cpp + TEST token_bucket_test SOURCES TokenBucketTest.cpp + TEST traits_test SOURCES TraitsTest.cpp + TEST try_test WINDOWS_DISABLED SOURCES TryTest.cpp + TEST unicode_test SOURCES UnicodeTest.cpp + TEST unit_test SOURCES UnitTest.cpp + BENCHMARK uri_benchmark SOURCES UriBenchmark.cpp + TEST uri_test SOURCES UriTest.cpp + TEST utf8_string_test SOURCES UTF8StringTest.cpp + TEST utility_test SOURCES UtilityTest.cpp + TEST varint_test SOURCES VarintTest.cpp +) + +get_target_property(pic folly POSITION_INDEPENDENT_CODE) +if (pic) + add_library(singleton_thread_local_overload + SHARED ${FOLLY_DIR}/test/SingletonThreadLocalTestOverload.cpp) + apply_folly_compile_options_to_target(singleton_thread_local_overload) + set_target_properties(singleton_thread_local_overload PROPERTIES + PREFIX "" + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/folly/test + ) + target_link_libraries(singleton_thread_local_overload PRIVATE folly) + folly_define_tests( + DIRECTORY test/ + TEST singleton_thread_local_test SOURCES SingletonThreadLocalTest.cpp + ) +endif() + +folly_define_tests( + DIRECTORY test/function_benchmark/ + BENCHMARK function_benchmark + SOURCES main.cpp benchmark_impl.cpp test_functions.cpp +) diff --git a/folly/testing/test/CMakeLists.txt b/folly/testing/test/CMakeLists.txt new file mode 100644 index 00000000000..2d563553050 --- /dev/null +++ b/folly/testing/test/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/testing/test/ + +folly_define_tests( + DIRECTORY testing/test/ + TEST testing_test_util_test SOURCES TestUtilTest.cpp +) diff --git a/folly/tracing/test/CMakeLists.txt b/folly/tracing/test/CMakeLists.txt new file mode 100644 index 00000000000..6dc083b82db --- /dev/null +++ b/folly/tracing/test/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test definitions for folly/tracing/test/ + +folly_define_tests( + DIRECTORY tracing/test/ + TEST static_tracepoint_section_test + SOURCES StaticTracepointSectionTest.cpp +)