1# Copyright (c) 2021-2023 Huawei Device Co., Ltd. 2# 3# This software is licensed under the terms of the GNU General Public 4# License version 2, as published by the Free Software Foundation, and 5# may be copied, distributed, and modified under those terms. 6# 7# This program is distributed in the hope that it will be useful, 8# but WITHOUT ANY WARRANTY; without even the implied warranty of 9# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10# GNU General Public License for more details. 11include drivers/hdf/khdf/test/test_khdf.mk 12HDF_FRAMWORK_TEST_ROOT = ../../../../framework/test/unittest 13 14obj-y += $(HDF_FRAMWORK_TEST_ROOT)/common/hdf_main_test.o \ 15 $(HDF_FRAMWORK_TEST_ROOT)/osal/osal_test_entry.o \ 16 $(HDF_FRAMWORK_TEST_ROOT)/osal/osal_all_test.o \ 17 $(HDF_FRAMWORK_TEST_ROOT)/osal/osal_list_test.o \ 18 $(HDF_FRAMWORK_TEST_ROOT)/osal/osal_file_test.o \ 19 $(HDF_FRAMWORK_TEST_ROOT)/osal/osal_work_test.o \ 20 $(HDF_FRAMWORK_TEST_ROOT)/osal/osal_get_case_test.o \ 21 $(HDF_FRAMWORK_TEST_ROOT)/manager/sample_driver_test.o \ 22 $(HDF_FRAMWORK_TEST_ROOT)/utils/hcs_parser/unittest/hcs_config_test.o \ 23 $(HDF_FRAMWORK_TEST_ROOT)/utils/hcs_parser/unittest/hcs_parser_test.o \ 24 $(HDF_FRAMWORK_TEST_ROOT)/pm/hdf_pm_driver_test.o \ 25 $(HDF_FRAMWORK_TEST_ROOT)/uevent/devmgr_uevent_test.o 26 27obj-$(CONFIG_DRIVERS_HDF_PLATFORM) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/platform_device_test.o \ 28 $(HDF_FRAMWORK_TEST_ROOT)/platform/common/platform_driver_test.o \ 29 $(HDF_FRAMWORK_TEST_ROOT)/platform/common/platform_event_test.o \ 30 $(HDF_FRAMWORK_TEST_ROOT)/platform/common/platform_manager_test.o \ 31 $(HDF_FRAMWORK_TEST_ROOT)/platform/common/platform_queue_test.o \ 32 $(HDF_FRAMWORK_TEST_ROOT)/platform/entry/hdf_platform_entry_test.o \ 33 platform/i2c/i2c_adapter_dummy.o 34 35ifeq ($(CONFIG_DRIVERS_HDF_PLATFORM_TRACE), y) 36obj-$(CONFIG_DRIVERS_HDF_PLATFORM) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/platform_trace_test.o 37endif 38 39ifeq ($(CONFIG_DRIVERS_HDF_PLATFORM_DUMPER), y) 40obj-$(CONFIG_DRIVERS_HDF_PLATFORM) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/platform_dumper_test.o 41endif 42 43obj-$(CONFIG_DRIVERS_HDF_PLATFORM_GPIO) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/gpio_test.o \ 44 $(HDF_FRAMWORK_TEST_ROOT)/platform/common/gpio_driver_test.o \ 45 $(HDF_FRAMWORK_TEST_ROOT)/platform/entry/hdf_gpio_entry_test.o 46obj-$(CONFIG_DRIVERS_HDF_PLATFORM_I2C) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/i2c_test.o \ 47 $(HDF_FRAMWORK_TEST_ROOT)/platform/common/i2c_driver_test.o \ 48 $(HDF_FRAMWORK_TEST_ROOT)/platform/entry/hdf_i2c_entry_test.o \ 49 $(HDF_FRAMWORK_TEST_ROOT)/platform/virtual/mini/i2c_mini_virtual.o 50obj-$(CONFIG_DRIVERS_HDF_PLATFORM_PWM) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/pwm_test.o \ 51 $(HDF_FRAMWORK_TEST_ROOT)/platform/common/pwm_driver_test.o \ 52 $(HDF_FRAMWORK_TEST_ROOT)/platform/entry/hdf_pwm_entry_test.o \ 53 $(HDF_FRAMWORK_TEST_ROOT)/platform/virtual/pwm_virtual.o 54obj-$(CONFIG_DRIVERS_HDF_PLATFORM_RTC) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/rtc_test.o \ 55 $(HDF_FRAMWORK_TEST_ROOT)/platform/common/rtc_driver_test.o \ 56 $(HDF_FRAMWORK_TEST_ROOT)/platform/entry/hdf_rtc_entry_test.o \ 57 $(HDF_FRAMWORK_TEST_ROOT)/platform/virtual/mini/rtc_mini_virtual.o 58obj-$(CONFIG_DRIVERS_HDF_PLATFORM_SPI) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/spi_test.o \ 59 $(HDF_FRAMWORK_TEST_ROOT)/platform/common/spi_driver_test.o \ 60 $(HDF_FRAMWORK_TEST_ROOT)/platform/entry/hdf_spi_entry_test.o \ 61 $(HDF_FRAMWORK_TEST_ROOT)/platform/virtual/spi_virtual.o 62obj-$(CONFIG_DRIVERS_HDF_PLATFORM_SDIO) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/sdio_test.o \ 63 $(HDF_FRAMWORK_TEST_ROOT)/platform/entry/hdf_sdio_entry_test.o 64obj-$(CONFIG_DRIVERS_HDF_PLATFORM_EMMC) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/emmc_test.o \ 65 $(HDF_FRAMWORK_TEST_ROOT)/platform/entry/hdf_emmc_entry_test.o 66 67obj-y += $(HDF_FRAMWORK_TEST_ROOT)/platform/virtual/mini/emmc_mini_virtual.o 68 69obj-$(CONFIG_DRIVERS_HDF_PLATFORM_UART) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/uart_test.o \ 70 $(HDF_FRAMWORK_TEST_ROOT)/platform/common/uart_driver_test.o \ 71 $(HDF_FRAMWORK_TEST_ROOT)/platform/entry/hdf_uart_entry_test.o \ 72 $(HDF_FRAMWORK_TEST_ROOT)/platform/virtual/mini/uart_mini_virtual.o 73obj-$(CONFIG_DRIVERS_HDF_PLATFORM_WATCHDOG) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/watchdog_test.o \ 74 $(HDF_FRAMWORK_TEST_ROOT)/platform/common/watchdog_driver_test.o \ 75 $(HDF_FRAMWORK_TEST_ROOT)/platform/entry/hdf_watchdog_entry_test.o \ 76 $(HDF_FRAMWORK_TEST_ROOT)/platform/virtual/watchdog_virtual.o \ 77 $(HDF_FRAMWORK_TEST_ROOT)/platform/virtual/mini/watchdog_mini_virtual.o 78obj-$(CONFIG_DRIVERS_HDF_PLATFORM_MIPI_DSI) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/mipi_dsi_test.o \ 79 $(HDF_FRAMWORK_TEST_ROOT)/platform/entry/hdf_mipi_dsi_entry_test.o 80obj-$(CONFIG_DRIVERS_HDF_PLATFORM_MIPI_CSI) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/mipi_csi_test.o \ 81 $(HDF_FRAMWORK_TEST_ROOT)/platform/entry/hdf_mipi_csi_entry_test.o 82obj-$(CONFIG_DRIVERS_HDF_PLATFORM_REGULATOR) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/regulator_test.o \ 83 $(HDF_FRAMWORK_TEST_ROOT)/platform/entry/hdf_regulator_entry_test.o \ 84 $(HDF_FRAMWORK_TEST_ROOT)/platform/virtual/regulator_linux_voltage_virtual_driver.o \ 85 $(HDF_FRAMWORK_TEST_ROOT)/platform/virtual/regulator_linux_current_virtual_driver.o 86obj-$(CONFIG_DRIVERS_HDF_PLATFORM_ADC) += $(HDF_FRAMWORK_TEST_ROOT)/platform/common/adc_test.o \ 87 $(HDF_FRAMWORK_TEST_ROOT)/platform/common/adc_driver_test.o \ 88 $(HDF_FRAMWORK_TEST_ROOT)/platform/entry/hdf_adc_entry_test.o \ 89 $(HDF_FRAMWORK_TEST_ROOT)/platform/virtual/adc_linux_virtual_iio_driver.o 90 91obj-$(CONFIG_DRIVERS_HDF_WIFI) += $(HDF_FRAMWORK_TEST_ROOT)/wifi/hdf_wifi_test.o \ 92 $(HDF_FRAMWORK_TEST_ROOT)/model/network/wifi/unittest/netdevice/net_device_test.o \ 93 $(HDF_FRAMWORK_TEST_ROOT)/model/network/wifi/unittest/module/hdf_module_test.o \ 94 $(HDF_FRAMWORK_TEST_ROOT)/model/network/wifi/unittest/net/hdf_netbuf_test.o \ 95 $(HDF_FRAMWORK_TEST_ROOT)/model/network/wifi/unittest/qos/flow_control_test.o \ 96 $(HDF_FRAMWORK_TEST_ROOT)/model/network/wifi/unittest/message/hdf_queue_test.o \ 97 $(HDF_FRAMWORK_TEST_ROOT)/model/network/wifi/unittest/message/hdf_single_node_message_test.o 98 99obj-$(CONFIG_DRIVERS_HDF_SENSOR) += $(HDF_FRAMWORK_TEST_ROOT)/sensor/hdf_sensor_test.o 100 101obj-$(CONFIG_DRIVERS_HDF_AUDIO_TEST) += $(HDF_FRAMWORK_TEST_ROOT)/model/audio/src/hdf_audio_test.o \ 102 $(HDF_FRAMWORK_TEST_ROOT)/model/audio/src/audio_host_test.o \ 103 $(HDF_FRAMWORK_TEST_ROOT)/model/audio/src/audio_core_test.o \ 104 $(HDF_FRAMWORK_TEST_ROOT)/model/audio/src/audio_parse_test.o \ 105 $(HDF_FRAMWORK_TEST_ROOT)/model/audio/src/audio_sapm_test.o \ 106 $(HDF_FRAMWORK_TEST_ROOT)/model/audio/src/audio_codec_base_test.o \ 107 $(HDF_FRAMWORK_TEST_ROOT)/model/audio/src/audio_dai_base_test.o \ 108 $(HDF_FRAMWORK_TEST_ROOT)/model/audio/src/audio_dma_base_test.o \ 109 $(HDF_FRAMWORK_TEST_ROOT)/model/audio/src/audio_dsp_base_test.o \ 110 $(HDF_FRAMWORK_TEST_ROOT)/model/audio/src/audio_platform_base_test.o 111 112ccflags-y += -I$(srctree)/drivers/hdf/framework/include \ 113 -I$(srctree)/drivers/hdf/framework/include/osal \ 114 -I$(srctree)/drivers/hdf/framework/include/utils \ 115 -I$(srctree)/drivers/hdf/framework/include \ 116 -I$(srctree)/drivers/hdf/framework/utils/include \ 117 -I$(srctree)/drivers/hdf/framework/include/core \ 118 -I$(srctree)/drivers/hdf/framework/core/host/include \ 119 -I$(srctree)/drivers/hdf/framework/core/manager/include \ 120 -I$(srctree)/drivers/hdf/framework/core/shared/include \ 121 -I$(srctree)/drivers/hdf/framework/core/common/include/host \ 122 -I$(srctree)/drivers/hdf/framework/core/common/include/manager \ 123 -I$(srctree)/drivers/hdf/framework/core/adapter/vnode/include \ 124 -I$(srctree)/drivers/hdf/inner_api/osal/shared \ 125 -I$(srctree)/drivers/hdf/inner_api/utils \ 126 -I$(srctree)/drivers/hdf/inner_api/core \ 127 -I$(srctree)/drivers/hdf/inner_api/host/shared \ 128 -I$(srctree)/bounds_checking_function/include \ 129 -I$(srctree)/drivers/hdf/framework/test/unittest/config \ 130 -I$(srctree)/drivers/hdf/framework/test/unittest/utils/hcs_parser/unittest \ 131 -I$(srctree)/drivers/hdf/framework/include/config \ 132 -I$(srctree)/drivers/hdf/framework/test/unittest/osal \ 133 -I$(srctree)/drivers/hdf/khdf/osal/include 134