Skip to content

[RDKE] L2 Tests And Integration With CI for Remote Debugger Dynamic Updates #113

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

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,18 @@ AC_TYPE_SIZE_T

AC_CONFIG_FILES([Makefile
src/Makefile])

AC_ARG_ENABLE([L2support],
AS_HELP_STRING([--enable-L2support],[enable L2support (default is no)]),
[
case "${enableval}" in
yes) L2_SUPPORT_ENABLE=true
L2_SUPPORT_FLAG="-DUSE_L2_SUPPORT"
m4_if(m4_sysval,[0],[SUBDIRS_L2_SUPPORT="src"]) ;;
no) L2_SUPPORT_ENABLE=false AC_MSG_ERROR([L2_SUPPORT is disabled]) ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-L2support]) ;;
esac
],
[echo "L2support is disabled"])
# IARMBus Support
AC_ARG_ENABLE([iarmbusSupport],
[ --enable-iarmbusSupport Turn on iarmbus support],
Expand Down
4 changes: 2 additions & 2 deletions cov_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ cp libIARM.h /usr/local/include
cd $WORKDIR
autoreconf -i
autoupdate
./configure --prefix=${INSTALL_DIR} --enable-iarmbusSupport=yes
make remotedebugger_CFLAGS="-I/usr/include/cjson -I/usr/local/include/wdmp-c -I/usr/local/include/rbus -I/usr/local/include -I/usr/local/include/trower-base64 -DIARMBUS_SUPPORT" remotedebugger_LDFLAGS="-L/usr/local/lib -lrdkloggers -lcjson -lrfcapi -lrbus -lmsgpackc -lsecure_wrapper -lwebconfig_framework -lIARMBus -ltr181api -L/usr/local/lib/x86_64-linux-gnu -ltrower-base64 -L/usr/lib/x86_64-linux-gnu"
./configure --prefix=${INSTALL_DIR} --enable-iarmbusSupport=yes --enable-L2support=yes
make remotedebugger_CFLAGS="-I/usr/include/cjson -I/usr/local/include/wdmp-c -I/usr/local/include/rbus -I/usr/local/include -I/usr/local/include/trower-base64 -DIARMBUS_SUPPORT -DUSE_L2_SUPPORT" remotedebugger_LDFLAGS="-L/usr/local/lib -lrdkloggers -lcjson -lrfcapi -lrbus -lmsgpackc -lsecure_wrapper -lwebconfig_framework -lIARMBus -ltr181api -L/usr/local/lib/x86_64-linux-gnu -ltrower-base64 -L/usr/lib/x86_64-linux-gnu"
make install
30 changes: 21 additions & 9 deletions src/rrdInterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,24 @@ int RRD_subscribe()
subscriptions[1].handler = _remoteDebuggerWebCfgDataEventHandler;
subscriptions[1].userData = NULL;

#ifndef IARMBUS_SUPPORT
subscriptions[2].eventName = RDM_DOWNLOAD_EVENT;
subscriptions[2].filter = NULL;
subscriptions[2].duration = 0;
subscriptions[2].handler = _rdmDownloadEventHandler;
subscriptions[2].userData = NULL;

ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 3, 60);
#ifdef IARMBUS_SUPPORT
#ifdef USE_L2_SUPPORT
subscriptions[2].eventName = RDM_DOWNLOAD_EVENT_MOCK;
subscriptions[2].filter = NULL;
subscriptions[2].duration = 0;
subscriptions[2].handler = _rdmDownloadEventHandler;
subscriptions[2].userData = NULL;
ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 3, 60);
#else
ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 2, 60);
#endif
#else
ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 2, 60);
subscriptions[2].eventName = RDM_DOWNLOAD_EVENT;
subscriptions[2].filter = NULL;
subscriptions[2].duration = 0;
subscriptions[2].handler = _rdmDownloadEventHandler;
subscriptions[2].userData = NULL;
ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 3, 60);
#endif
#endif
if(ret != 0)
Expand Down Expand Up @@ -250,7 +258,11 @@ void _rdmDownloadEventHandler(rbusHandle_t handle, rbusEvent_t const* event, rbu

(void)(handle);
(void)(subscription);
#ifdef USE_L2_SUPPORT
RDK_LOG(RDK_LOG_INFO, LOG_REMDEBUG, "[%s:%d]: Received event for RDM_DOWNLOAD_EVENT %s \n", __FUNCTION__, __LINE__, RDM_DOWNLOAD_EVENT_MOCK);
#else
RDK_LOG(RDK_LOG_INFO, LOG_REMDEBUG, "[%s:%d]: Received event for RDM_DOWNLOAD_EVENT %s \n", __FUNCTION__, __LINE__, RDM_DOWNLOAD_EVENT);
#endif
cache = findPresentInCache(pkg_name);
if (cache != NULL)
{
Expand Down
1 change: 1 addition & 0 deletions src/rrdInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ extern "C"
#define RRD_SET_ISSUE_EVENT "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.IssueType"
#define RRD_WEBCFG_ISSUE_EVENT "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.WebCfgData"
#define RDM_DOWNLOAD_EVENT "Device.DeviceInfo.X_RDKCENTRAL-COM_RDKDownloadManager.DownloadStatus"
#define RDM_DOWNLOAD_EVENT_MOCK "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.DownloadStatus"
#define RRD_PROCESS_NAME "remotedebugger"
#define RRD_RBUS_TIMEOUT 60

Expand Down
Loading