Skip to content

Commit e86dd66

Browse files
Abhinavpv28nhanasi
andauthored
RDK-56291 L2 Tests And Integration With CI for Remote Debugger Dynamic Updates (#117)
* Update rrdInterface.c * Update rrdInterface.c * Update rrdInterface.c * Update cov_build.sh * Update configure.ac * Update rrdInterface.c * Update rrdInterface.h * Update cov_build.sh * Update rrdInterface.c * Update rrdInterface.h * Update rrdInterface.c --------- Co-authored-by: nhanasi <[email protected]>
1 parent 81ef88a commit e86dd66

File tree

3 files changed

+31
-12
lines changed

3 files changed

+31
-12
lines changed

configure.ac

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,18 @@ AC_TYPE_SIZE_T
6161

6262
AC_CONFIG_FILES([Makefile
6363
src/Makefile])
64-
64+
AC_ARG_ENABLE([L2support],
65+
AS_HELP_STRING([--enable-L2support],[enable L2support (default is no)]),
66+
[
67+
case "${enableval}" in
68+
yes) L2_SUPPORT_ENABLE=true
69+
L2_SUPPORT_FLAG="-DUSE_L2_SUPPORT"
70+
m4_if(m4_sysval,[0],[SUBDIRS_L2_SUPPORT="src"]) ;;
71+
no) L2_SUPPORT_ENABLE=false AC_MSG_ERROR([L2_SUPPORT is disabled]) ;;
72+
*) AC_MSG_ERROR([bad value ${enableval} for --enable-L2support]) ;;
73+
esac
74+
],
75+
[echo "L2support is disabled"])
6576
# IARMBus Support
6677
AC_ARG_ENABLE([iarmbusSupport],
6778
[ --enable-iarmbusSupport Turn on iarmbus support],

cov_build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ cp libIARM.h /usr/local/include
7878
cd $WORKDIR
7979
autoreconf -i
8080
autoupdate
81-
./configure --prefix=${INSTALL_DIR} --enable-iarmbusSupport=yes
82-
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"
81+
./configure --prefix=${INSTALL_DIR} --enable-iarmbusSupport=yes --enable-L2support=yes
82+
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"
8383
make install

src/rrdInterface.c

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,24 @@ int RRD_subscribe()
7474
subscriptions[1].handler = _remoteDebuggerWebCfgDataEventHandler;
7575
subscriptions[1].userData = NULL;
7676

77-
#ifndef IARMBUS_SUPPORT
78-
subscriptions[2].eventName = RDM_DOWNLOAD_EVENT;
79-
subscriptions[2].filter = NULL;
80-
subscriptions[2].duration = 0;
81-
subscriptions[2].handler = _rdmDownloadEventHandler;
82-
subscriptions[2].userData = NULL;
83-
84-
ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 3, 60);
77+
#ifdef IARMBUS_SUPPORT
78+
#ifdef USE_L2_SUPPORT
79+
subscriptions[2].eventName = RDM_DOWNLOAD_EVENT;
80+
subscriptions[2].filter = NULL;
81+
subscriptions[2].duration = 0;
82+
subscriptions[2].handler = _rdmDownloadEventHandler;
83+
subscriptions[2].userData = NULL;
84+
ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 3, 60);
85+
#else
86+
ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 2, 60);
87+
#endif
8588
#else
86-
ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 2, 60);
89+
subscriptions[2].eventName = RDM_DOWNLOAD_EVENT;
90+
subscriptions[2].filter = NULL;
91+
subscriptions[2].duration = 0;
92+
subscriptions[2].handler = _rdmDownloadEventHandler;
93+
subscriptions[2].userData = NULL;
94+
ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 3, 60);
8795
#endif
8896
#endif
8997
if(ret != 0)

0 commit comments

Comments
 (0)