1# Copyright 2016 The Fuchsia Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5# If set, disable building these tests which account for a fair amount 6# of build time 7ifeq ($(call TOBOOL,$(DISABLE_FBL_TEST)),false) 8 9LOCAL_DIR := $(GET_LOCAL_DIR) 10 11fbl_common_tests := \ 12 $(LOCAL_DIR)/algorithm_tests.cpp \ 13 $(LOCAL_DIR)/array_tests.cpp \ 14 $(LOCAL_DIR)/atomic_tests.cpp \ 15 $(LOCAL_DIR)/auto_call_tests.cpp \ 16 $(LOCAL_DIR)/forward_tests.cpp \ 17 $(LOCAL_DIR)/function_tests.cpp \ 18 $(LOCAL_DIR)/initializer_list_tests.cpp \ 19 $(LOCAL_DIR)/integer_sequence_tests.cpp \ 20 $(LOCAL_DIR)/intrusive_container_tests.cpp \ 21 $(LOCAL_DIR)/intrusive_doubly_linked_list_tests.cpp \ 22 $(LOCAL_DIR)/intrusive_hash_table_dll_tests.cpp \ 23 $(LOCAL_DIR)/intrusive_hash_table_sll_tests.cpp \ 24 $(LOCAL_DIR)/intrusive_singly_linked_list_tests.cpp \ 25 $(LOCAL_DIR)/intrusive_wavl_tree_tests.cpp \ 26 $(LOCAL_DIR)/main.c \ 27 $(LOCAL_DIR)/recycler_tests.cpp \ 28 $(LOCAL_DIR)/ref_ptr_tests.cpp \ 29 $(LOCAL_DIR)/string_buffer_tests.cpp \ 30 $(LOCAL_DIR)/string_piece_tests.cpp \ 31 $(LOCAL_DIR)/string_printf_tests.cpp \ 32 $(LOCAL_DIR)/string_tests.cpp \ 33 $(LOCAL_DIR)/string_traits_tests.cpp \ 34 $(LOCAL_DIR)/type_info_tests.cpp \ 35 $(LOCAL_DIR)/type_support_tests.cpp \ 36 $(LOCAL_DIR)/unique_free_ptr_tests.cpp \ 37 $(LOCAL_DIR)/unique_ptr_tests.cpp \ 38 $(LOCAL_DIR)/unique_fd_tests.cpp \ 39 $(LOCAL_DIR)/vector_tests.cpp \ 40 41fbl_device_tests := $(fbl_common_tests) 42 43# These tests won't run on the host. 44# 45# Some of these tests need fbl::Mutex which currently isn't supported on the 46# host. TODO(ZX-1053): Support fbl::Mutex on the host and make the ref counted 47# and slab allocator tests work. 48fbl_device_tests += \ 49 $(LOCAL_DIR)/ref_counted_tests.cpp \ 50 $(LOCAL_DIR)/slab_allocator_tests.cpp \ 51 52fbl_host_tests := $(fbl_common_tests) 53 54# Userspace tests. 55 56MODULE := $(LOCAL_DIR) 57 58MODULE_TYPE := usertest 59 60MODULE_NAME := fbl-test 61 62MODULE_SRCS := $(fbl_device_tests) 63 64MODULE_STATIC_LIBS := \ 65 system/ulib/zxcpp \ 66 system/ulib/fbl \ 67 system/ulib/zx \ 68 69MODULE_LIBS := \ 70 system/ulib/c \ 71 system/ulib/fdio \ 72 system/ulib/unittest \ 73 system/ulib/zircon \ 74 75include make/module.mk 76 77# Host tests. 78 79MODULE := $(LOCAL_DIR).hostapp 80 81MODULE_TYPE := hosttest 82 83MODULE_NAME := fbl-test 84 85MODULE_SRCS := $(fbl_host_tests) 86 87MODULE_COMPILEFLAGS := \ 88 -Isystem/ulib/fbl/include \ 89 -Isystem/ulib/unittest/include \ 90 91MODULE_HOST_LIBS := \ 92 system/ulib/fbl.hostlib \ 93 system/ulib/pretty.hostlib \ 94 system/ulib/unittest.hostlib \ 95 96include make/module.mk 97 98# Clear local variables. 99 100fbl_common_tests := 101fbl_device_tests := 102fbl_host_tests := 103 104endif # DISABLE_FBL_TEST 105