Эх сурвалжийг харах

msm: ipa: Add support compile ut framework

Make changes to compile ut framework with bzl environment.

Change-Id: I91bf53701938241729698a5bc0c4f7586f35c171
Signed-off-by: Chaitanya Pratapa <[email protected]>
Chaitanya Pratapa 2 жил өмнө
parent
commit
131309cd05

+ 15 - 0
define_modules.bzl

@@ -171,6 +171,21 @@ def define_modules(target, variant):
                     "drivers/platform/msm/ipa/ipa_clients/rndis_ipa.c",
                 ],
             },
+            "CONFIG_IPA_UT": {
+                True: [
+                    "drivers/platform/msm/ipa/test/ipa_ut_framework.c",
+                    "drivers/platform/msm/ipa/test/ipa_ut_framework.h",
+                    "drivers/platform/msm/ipa/test/ipa_ut_i.h",
+                    "drivers/platform/msm/ipa/test/ipa_ut_suite_list.h",
+                    "drivers/platform/msm/ipa/test/ipa_test_example.c",
+                    "drivers/platform/msm/ipa/test/ipa_test_mhi.c",
+                    "drivers/platform/msm/ipa/test/ipa_test_dma.c",
+                    "drivers/platform/msm/ipa/test/ipa_test_hw_stats.c",
+                    "drivers/platform/msm/ipa/test/ipa_pm_ut.c",
+                    "drivers/platform/msm/ipa/test/ipa_test_wdi3.c",
+                    "drivers/platform/msm/ipa/test/ipa_test_ntn.c",
+                ],
+            },
         },
         local_defines = [
             "GSI_TRACE_INCLUDE_PATH={}/drivers/platform/msm/gsi".format(include_base),

+ 4 - 0
drivers/platform/msm/Android.mk

@@ -7,7 +7,9 @@ LOCAL_MODULE_DDK_BUILD := true
 LOCAL_MODULE_KO_DIRS := gsi/gsim.ko
 LOCAL_MODULE_KO_DIRS += ipa/ipam.ko
 LOCAL_MODULE_KO_DIRS += ipa/ipanetm.ko
+ifeq ($(CONFIG_LOCALVERSION), "-gki-consolidate")
 LOCAL_MODULE_KO_DIRS += ipa/ipatestm.ko
+endif
 
 ifeq ($(call is-board-platform-in-list, $(GSI_DLKM_PLATFORMS_LIST)),true)
 #Make file to create GSI DLKM
@@ -51,6 +53,7 @@ LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
 $(warning $(DLKM_DIR))
 include $(DLKM_DIR)/Build_external_kernelmodule.mk
 
+ifeq ($(CONFIG_LOCALVERSION), "-gki-consolidate")
 include $(CLEAR_VARS)
 KBUILD_OPTIONS += MODNAME=ipatestm
 LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
@@ -61,6 +64,7 @@ LOCAL_HEADER_LIBRARIES    := ipa_test_kernel_headers
 LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
 $(warning $(DLKM_DIR))
 include $(DLKM_DIR)/Build_external_kernelmodule.mk
+endif
 
 endif #End of Check for target
 endif #End of Check for qssi target

+ 3 - 2
drivers/platform/msm/ipa/test/ipa_test_ntn.c

@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include "ipa_ut_framework.h"
@@ -441,7 +442,7 @@ fail_alloc_mmio:
 	return ret;
 }
 
-static void ipa_ntn_test_print_stats()
+static void ipa_ntn_test_print_stats(void)
 {
 	struct ipa_uc_dbg_ring_stats stats;
 	int ret;
@@ -532,7 +533,7 @@ static int ipa_ntn_test_ready_cb(void *priv)
 	return 0;
 }
 
-static void ipa_ntn_test_del_client_list()
+static void ipa_ntn_test_del_client_list(void)
 {
 	struct ipa_eth_client *eth_client = &test_ntn_ctx->client;
 	struct ipa_eth_client_pipe_info *pipe_info, *tmp;