Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tapi modification #8

Merged
merged 10 commits into from
Dec 24, 2024
21 changes: 21 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ config TELEPHONY_TOOL
bool "Telephony tool"
default n

config TELEPHONY_TEST
bool "enbale telephony test"
default n
depends on TELEPHONY && TESTING_CMOCKA

if TELEPHONY_TOOL

config TELEPHONY_TOOL_STACKSIZE
Expand All @@ -50,5 +55,21 @@ config TELEPHONY_TOOL_PRIORITY
int "Telephony tool priority"
default 100

endif

if TELEPHONY_TEST

config TELEPHONY_TEST_PRIORITY
int "cmocka_telephony_test priority"
default 99

config TELEPHONY_TEST_STACKSIZE
int "cmocka_telephony_test stack size"
default 16384

config TEST_PHONE_NUMBER
string "test phone number"
default "10086"

endif
endif
23 changes: 15 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,21 @@ ifneq ($(CONFIG_TELEPHONY_TOOL),)
STACKSIZE += $(CONFIG_TELEPHONY_TOOL_STACKSIZE)
endif

ASRCS := $(wildcard $(ASRCS))
CSRCS := $(wildcard $(CSRCS))
CXXSRCS := $(wildcard $(CXXSRCS))
MAINSRC := $(wildcard $(MAINSRC))
NOEXPORTSRCS = $(ASRCS)$(CSRCS)$(CXXSRCS)$(MAINSRC)

ifneq ($(NOEXPORTSRCS),)
BIN := $(APPDIR)/staging/libframework.a
ifneq ($(CONFIG_TELEPHONY_TEST),)
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/testing/cmocka/cmocka/include
CSRCS += $(filter-out test/*_telephony_test.c, $(wildcard test/*.c))

ifneq ($(CONFIG_GOLDFISH_RIL),)
MAINSRC += $(CURDIR)/test/cmocka_telephony_test.c
else
MAINSRC += $(CURDIR)/test/product_telephony_test.c
endif
PROGNAME += cmocka_telephony_test
PRIORITY += $(CONFIG_TELEPHONY_TEST_PRIORITY)
STACKSIZE += $(CONFIG_TELEPHONY_TEST_STACKSIZE)

depend::
$(Q) touch $(CSRCS)
endif

EXPORT_FILES := include
Expand Down
2 changes: 1 addition & 1 deletion src/tapi_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static int data_property_changed(DBusConnection* connection,
ar->arg2 = tapi_utils_get_slot_id(slot);
isvalid = true;
} else if ((ar->msg_id == MSG_DATA_NETWORK_TYPE_CHANGE_IND)
&& (strcmp(property, "Bearer") == 0)) {
&& (strcmp(property, "Technology") == 0)) {
ar->status = OK;

dbus_message_iter_get_basic(&var, &value_int);
Expand Down
Loading
Loading