Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
583f077
RDK-59059: Modify native platform instead of ci
dharshini555 Sep 8, 2025
391a535
Update profileTest.cpp
dharshini555 Sep 8, 2025
8d7473f
Change native-platform container instead of ci
dharshini555 Sep 11, 2025
86cae7d
Update L1-tests.yml
dharshini555 Sep 12, 2025
951ae62
Update test code
dharshini555 Sep 22, 2025
7a11f09
Merge branch 'develop' into topic/RDK-59038
dharshini555 Sep 23, 2025
1ff1e0a
Update test cases to increase line coverage
dharshini555 Sep 25, 2025
7259802
Update test cases to improve line coverage
dharshini555 Sep 25, 2025
60bf06a
Remove rbus files from test dir as it is available by default in nati…
dharshini555 Sep 30, 2025
971950e
Update new binaries in run_ut.sh script
dharshini555 Sep 30, 2025
aeb7901
Merge branch 'develop' into topic/RDK-59038
dharshini555 Sep 30, 2025
5b5ff0b
Update TelemetryBusMsgSender.cpp
dharshini555 Sep 30, 2025
1d796d3
Fix formatting errors
dharshini555 Sep 30, 2025
5c4b7c8
Update TelemetryBusMsgSender.cpp
dharshini555 Sep 30, 2025
f531243
Update TelemetryBusMsgSender.cpp
dharshini555 Sep 30, 2025
aeeeb93
Update TelemetryBusMsgSender.cpp
dharshini555 Sep 30, 2025
e794f2d
Update ccspinterfaceTest.cpp
dharshini555 Sep 30, 2025
0bcc965
Update ccspinterfaceTest.cpp
dharshini555 Sep 30, 2025
a7a3b58
Update dcautilTest.cpp
dharshini555 Sep 30, 2025
bc71978
Improve L1 test coverage
dharshini555 Sep 30, 2025
e55e20f
Resolve crash issues
dharshini555 Sep 30, 2025
81ffb83
Update t2markersTest.cpp
dharshini555 Sep 30, 2025
6b883ff
Update code-coverage.yml
dharshini555 Sep 30, 2025
1ca9661
Update profileTest.cpp
dharshini555 Sep 30, 2025
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
50 changes: 38 additions & 12 deletions .github/workflows/L1-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit Tests
name: L1 Unit Tests

on:
pull_request:
Expand All @@ -9,24 +9,50 @@
AUTOMATICS_PASSCODE: ${{ secrets.AUTOMATICS_PASSCODE }}

jobs:
execute-unit-tests-on-pr:
name: Execute unit tests in gtest test suite
execute-L1-tests-on-pr:
name: Execute L1 test suite in test container environment
runs-on: ubuntu-latest
container:
image: ghcr.io/rdkcentral/docker-rdk-ci:latest

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pull test container image
run: docker pull ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest

- name: Run unit tests
run: sh -c test/run_ut.sh
- name: Start test container
run: |
docker run -d --name native-platform -v ${{ github.workspace }}:/mnt/L1_CONTAINER_SHARED_VOLUME ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest

- name: Run L1 Unit Tests inside container
run: docker exec -i native-platform /bin/bash -c "cd /mnt/L1_CONTAINER_SHARED_VOLUME/ && sh test/run_ut.sh"

- name: Copy L1 test results to runner
run: |
docker cp native-platform:/tmp/Gtest_Report /tmp/Gtest_Report
ls -l /tmp/Gtest_Report

- name: Upload test results to automatic test result management system
upload-test-results:
name: Upload L1 test results to automatic test result management system
needs: execute-L1-tests-on-pr
runs-on: ubuntu-latest
container:
image: ghcr.io/rdkcentral/docker-rdk-ci:latest
volumes:
- /tmp/Gtest_Report:/tmp/Gtest_Report

steps:
- name: Upload results
if: github.repository_owner == 'rdkcentral'
run: |
echo "Contents in /tmp/Gtest_Report:"
ls -l /tmp/Gtest_Report
git config --global --add safe.directory `pwd`
gtest-json-result-push.py /tmp/Gtest_Report https://rdkeorchestrationservice.apps.cloud.comcast.net/rdke_orchestration_api/push_unit_test_results `pwd`

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}



46 changes: 37 additions & 9 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,61 @@ name: Code Coverage

on:
pull_request:
branches: [ main ]
branches: [ main develop]

env:
AUTOMATICS_UNAME: ${{ secrets.AUTOMATICS_UNAME }}
AUTOMATICS_PASSCODE: ${{ secrets.AUTOMATICS_PASSCODE }}

jobs:
execute-unit-code-coverage-report-on-release:
name: Test coverage report for release
runs-on: ubuntu-latest
container:
image: ghcr.io/rdkcentral/docker-rdk-ci:latest

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run unit tests with coverage flags enabled
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pull test container image
run: docker pull ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest

- name: Start test container
run: |
sh test/run_ut.sh --enable-cov
docker run -d --name native-platform -v ${{ github.workspace }}:/mnt/L1_CONTAINER_SHARED_VOLUME ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest

- name: Run unit tests with coverage flags enabled
run: docker exec -i native-platform /bin/bash -c "cd /mnt/L1_CONTAINER_SHARED_VOLUME/ && sh test/run_ut.sh --enable-cov"

- name: Caculate the code coverage summary
run: |
lcov --list coverage.info | grep "Lines\|Total" > /tmp/coverage_summary.txt

lcov --list coverage.info | grep "Lines\|Total" > /tmp/Gtest_Report/coverage_summary.txt

- name: Copy the code coverage to runner
run: |
docker cp native-platform:/tmp/Gtest_Report/ /tmp/Gtest_Report/

upload-test-results:
name: Upload L1 test results to automatic test result management system
needs: execute-L1-tests-on-pr
runs-on: ubuntu-latest
container:
image: ghcr.io/rdkcentral/docker-rdk-ci:latest
volumes:
- /tmp/Gtest_Report:/tmp/Gtest_Report

- name: Update the coverage report to Pull request using actions
uses: actions/github-script@v4
with:
script: |
const fs = require('fs');
const lcov_result = fs.readFileSync('/tmp/coverage_summary.txt', 'utf8');
const lcov_result = fs.readFileSync('/tmp/Gtest_Report/coverage_summary.txt', 'utf8');

github.issues.createComment({
issue_number: context.issue.number,
Expand Down
17 changes: 15 additions & 2 deletions source/bulkdata/profilexconf.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:

Check failure on line 3 in source/bulkdata/profilexconf.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'source/bulkdata/profilexconf.c' (Match: rdk/components/generic/telemetry/rdk/components/generic/telemetry/1, 1026 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/telemetry/+archive/RDKB-RELEASE-TEST-DUNFELL-1.tar.gz, file: source/bulkdata/profilexconf.c)
*
* Copyright 2019 RDK Management
*
Expand Down Expand Up @@ -53,6 +53,11 @@
static bool isAbortTriggered = false ;
static bool isOnDemandReport = false ;

#ifdef GTEST_ENABLE
#define sendReportOverHTTP __wrap_sendReportOverHTTP
#define sendCachedReportsOverHTTP __wrap_sendCachedReportsOverHTTP
#endif

static char *getTimeStamp (void)
{
char *timeStamp;
Expand Down Expand Up @@ -242,14 +247,17 @@
clock_gettime(CLOCK_REALTIME, &startTime);
if(profile->encodingType != NULL && !strcmp(profile->encodingType, "JSON"))
{
T2Info("inside if\n");
if(T2ERROR_SUCCESS != initJSONReportXconf(&profile->jsonReportObj, &valArray))
{
T2Info("inside init\n");
T2Error("Failed to initialize JSON Report\n");
profile->reportInProgress = false;
//pthread_mutex_unlock(&plMutex);
//return NULL;
goto reportXconfThreadEnd;
}
T2Info("after init\n");

#ifdef PERSIST_LOG_MON_REF
if(profile->checkPreviousSeek)
Expand Down Expand Up @@ -426,6 +434,7 @@
ret = sendCachedReportsOverHTTP(profile->t2HTTPDest->URL, profile->cachedReportList);
if(ret == T2ERROR_SUCCESS)
{
T2Info("inside if\n");
// Do not get misleaded by function name. Call is to delete the directory for storing cached reports
removeProfileFromDisk(CACHED_MESSAGE_PATH, profile->name);
}
Expand All @@ -440,7 +449,7 @@
{
T2Error("Unsupported encoding format : %s\n", profile->encodingType);
}

T2Info("after encoding\n");
# ifdef PERSIST_LOG_MON_REF
if(T2ERROR_SUCCESS == saveSeekConfigtoFile(profile->name, profile->grepSeekProfile))
{
Expand All @@ -451,7 +460,7 @@
T2Warning("Failed to save grep config to file for profile: %s\n", profile->name);
}
#endif

T2Info("clock gettime\n");
clock_gettime(CLOCK_REALTIME, &endTime);
getLapsedTime(&elapsedTime, &endTime, &startTime);
T2Info("Elapsed Time for : %s = %lu.%lu (Sec.NanoSec)\n", profile->name, (unsigned long)elapsedTime.tv_sec, elapsedTime.tv_nsec);
Expand Down Expand Up @@ -657,7 +666,9 @@
{
for(; emIndex < Vector_Size(singleProfile->eMarkerList); emIndex++)
{
T2Info("inside for loop\n");
eMarker = (EventMarker *)Vector_At(singleProfile->eMarkerList, emIndex);
T2Info("marker = %s\n", eMarker->markerName);
addT2EventMarker(eMarker->markerName, eMarker->compName, singleProfile->name, eMarker->skipFreq);
}
}
Expand Down Expand Up @@ -937,7 +948,9 @@
EventMarker *lookupEvent = NULL;
for(; eventIndex < Vector_Size(singleProfile->eMarkerList); eventIndex++)
{
T2Info("inside for loop\n");
EventMarker *tempEventMarker = (EventMarker *)Vector_At(singleProfile->eMarkerList, eventIndex);
T2Info("markername = %s\n", tempEventMarker->markerName);
if(!strcmp(tempEventMarker->markerName, eventInfo->name))
{
lookupEvent = tempEventMarker;
Expand Down
4 changes: 0 additions & 4 deletions source/ccspinterface/rbusInterface.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:

Check failure on line 3 in source/ccspinterface/rbusInterface.h

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'source/ccspinterface/rbusInterface.h' (Match: rdk/components/generic/telemetry/rdk/components/generic/telemetry/1, 25 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/telemetry/+archive/RDKB-RELEASE-TEST-DUNFELL-1.tar.gz, file: source/ccspinterface/rbusInterface.h)
*
* Copyright 2019 RDK Management
*
Expand All @@ -23,11 +23,7 @@
#include <stdio.h>
#include <stdbool.h>
#include <vector.h>
#ifdef GTEST_ENABLE
#include "test/rbus/include/rbus.h"
#else
#include <rbus/rbus.h>
#endif
#include "busInterface.h"
#include "telemetry2_0.h"

Expand Down
5 changes: 4 additions & 1 deletion source/protocol/http/curlinterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
#ifdef LIBRDKCONFIG_BUILD
#include "rdkconfig.h"
#endif

#ifdef GTEST_ENABLE
#define curl_easy_setopt curl_easy_setopt_mock
#define curl_easy_getinfo curl_easy_getinfo_mock
#endif
extern sigset_t blocking_signal;

typedef struct
Expand Down
32 changes: 29 additions & 3 deletions source/test/bulkdata/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

##########################################################################
# If not stated otherwise in this file or this component's LICENSE
# file the following copyright and licenses apply:
Expand All @@ -17,19 +18,44 @@
# limitations under the License.
##########################################################################

AM_CXXFLAGS = -fno-permissive -std=c++11 -DGTEST_ENABLE -DPERSIST_LOG_MON_REF -fPIC -DPRIVACYMODES_CONTROL -DBULKDATA
AM_CXXFLAGS = -fno-permissive -std=c++11 -DPERSIST_LOG_MON_REF -fPIC -DPRIVACYMODES_CONTROL -DBULKDATA
#-DFEATURE_SUPPORT_WEBCONFIG -DDROP_ROOT_PRIV

AM_CFLAGS = -DGTEST_ENABLE -DPERSIST_LOG_MON_REF -fPIC
AM_CFLAGS = -DPERSIST_LOG_MON_REF -fPIC

AUTOMAKE_OPTIONS = subdir-objects

ACLOCAL_AMFLAGS = -I m4

bin_PROGRAMS = profile_gtest.bin
bin_PROGRAMS = profile_gtest.bin datamodel_gtest.bin t2markers_gtest.bin profilexconf_gtest_bin

datamodel_gtest_bin_CPPFLAGS = -I$(PKG_CONFIG_SYSROOT_DIR)/usr/include/gtest -I$(PKG_CONFIG_SYSROOT_DIR)/usr/include/glib-2.0 -I$(PKG_CONFIG_SYSROOT_DIR)/usr/lib/x86_64-linux-gnu/glib-2.0/include -I$(PKG_CONFIG_SYSROOT_DIR)/usr/local/lib -I$(PKG_CONFIG_SYSROOT_DIR)$(includedir)/gtest -I${top_srcdir}/gtest/include -I${top_srcdir}/source/include -I${top_srcdir}/source -I${top_srcdir}/source/test/mocks -I${top_srcdir}/source/test/rbus -I${top_srcdir}/source/test/rdk_logger -I${top_srcdir}/include -I${top_srcdir}/source/utils -I${top_srcdir}/source/privacycontrol -I${PKG_CONFIG_SYSROOT_DIR}$(includedir)/rbus -I${top_srcdir}/source/dcautil -I${top_srcdir}/source/ccspinterface -I${top_srcdir}/source/reportgen -I${top_srcdir}/source/xconf-client -I${top_srcdir}/source/protocol/http -I${top_srcdir}/source/protocol/rbusMethod -I${top_srcdir}/source/t2parser -I${top_srcdir}/source/bulkdata -I${top_srcdir}/source/scheduler -I${top_srcdir}/source/ccspinterface -I${PKG_CONFIG_SYSROOT_DIR}$(includedir) -I${PKG_CONFIG_SYSROOT_DIR}/usr/src/googletest/googlemock/include -I${RDK_PROJECT_ROOT_PATH}/$(GLIB_CFLAGS) -I${PKG_CONFIG_SYSROOT_DIR}$(includedir)/glib-2.0 -I${PKG_CONFIG_SYSROOT_DIR}$(libdir)/glib-2.0/include

datamodel_gtest_bin_SOURCES = gtest_main.cpp ../../bulkdata/datamodel.c datamodelTest.cpp datamodelMock.cpp ../mocks/SystemMock.cpp ../mocks/FileioMock.cpp ../mocks/rdklogMock.cpp ../mocks/rbusMock.cpp ../../utils/persistence.c ../../utils/t2common.c ../../utils/t2collection.c ../../utils/t2MtlsUtils.c ../../utils/t2log_wrapper.c ../../utils/vector.c

datamodel_gtest_bin_LDFLAGS = -L/usr/src/googletest/googletest/lib/.libs -lgcov -L/src/googletest/googlemock/lib -L/usr/src/googletest/googlemock/lib/.libs -L/usr/include/glib-2.0 -lgmock -lcjson -lcurl -lmsgpackc -lgtest -lgtest_main -lglib-2.0

datamodel_gtest_bin_LDFLAGS += -Wl,--wrap=ReportProfiles_ProcessReportProfilesBlob -Wl,--wrap=ReportProfiles_ProcessReportProfilesMsgPackBlob

t2markers_gtest_bin_CPPFLAGS = -I$(PKG_CONFIG_SYSROOT_DIR)/usr/include/gtest -I$(PKG_CONFIG_SYSROOT_DIR)/usr/include/glib-2.0 -I$(PKG_CONFIG_SYSROOT_DIR)/usr/lib/x86_64-linux-gnu/glib-2.0/include -I$(PKG_CONFIG_SYSROOT_DIR)/usr/local/lib -I$(PKG_CONFIG_SYSROOT_DIR)$(includedir)/gtest -I${top_srcdir}/gtest/include -I${top_srcdir}/source/include -I${top_srcdir}/source -I${top_srcdir}/source/test/mocks -I${top_srcdir}/source/test/rbus -I${top_srcdir}/source/test/rdk_logger -I${top_srcdir}/include -I${top_srcdir}/source/utils -I${top_srcdir}/source/privacycontrol -I${PKG_CONFIG_SYSROOT_DIR}$(includedir)/rbus -I${top_srcdir}/source/dcautil -I${top_srcdir}/source/ccspinterface -I${top_srcdir}/source/reportgen -I${top_srcdir}/source/xconf-client -I${top_srcdir}/source/protocol/http -I${top_srcdir}/source/protocol/rbusMethod -I${top_srcdir}/source/t2parser -I${top_srcdir}/source/bulkdata -I${top_srcdir}/source/scheduler -I${top_srcdir}/source/ccspinterface -I${PKG_CONFIG_SYSROOT_DIR}$(includedir) -I${PKG_CONFIG_SYSROOT_DIR}/usr/src/googletest/googlemock/include -I${RDK_PROJECT_ROOT_PATH}/$(GLIB_CFLAGS) -I${PKG_CONFIG_SYSROOT_DIR}$(includedir)/glib-2.0 -I${PKG_CONFIG_SYSROOT_DIR}$(libdir)/glib-2.0/include

t2markers_gtest_bin_SOURCES = gtest_main.cpp t2markersTest.cpp t2markersMock.cpp ../../bulkdata/t2markers.c ../../bulkdata/t2eventreceiver.c ../../ccspinterface/rbusInterface.c ../mocks/rdklogMock.cpp ../mocks/rbusMock.cpp ../../utils/t2common.c ../../utils/t2collection.c ../../utils/t2log_wrapper.c ../../utils/vector.c

t2markers_gtest_bin_LDFLAGS = -L/usr/src/googletest/googletest/lib/.libs -lgcov -L/src/googletest/googlemock/lib -L/usr/src/googletest/googlemock/lib/.libs -L/usr/include/glib-2.0 -lgmock -lcjson -lcurl -lmsgpackc -lgtest -lgtest_main -lglib-2.0

profilexconf_gtest_bin_CFLAGS = -DGTEST_ENABLE

profilexconf_gtest_bin_CPPFLAGS = -I$(PKG_CONFIG_SYSROOT_DIR)/usr/include/gtest -I$(PKG_CONFIG_SYSROOT_DIR)/usr/include/glib-2.0 -I$(PKG_CONFIG_SYSROOT_DIR)/usr/lib/x86_64-linux-gnu/glib-2.0/include -I$(PKG_CONFIG_SYSROOT_DIR)/usr/local/lib -I$(PKG_CONFIG_SYSROOT_DIR)$(includedir)/gtest -I${top_srcdir}/gtest/include -I${top_srcdir}/source/include -I${top_srcdir}/source -I${top_srcdir}/source/test/mocks -I${top_srcdir}/source/test/rbus -I${top_srcdir}/source/test/rdk_logger -I${top_srcdir}/include -I${top_srcdir}/source/utils -I${top_srcdir}/source/privacycontrol -I${PKG_CONFIG_SYSROOT_DIR}$(includedir)/rbus -I${top_srcdir}/source/dcautil -I${top_srcdir}/source/ccspinterface -I${top_srcdir}/source/reportgen -I${top_srcdir}/source/xconf-client -I${top_srcdir}/source/protocol/http -I${top_srcdir}/source/protocol/rbusMethod -I${top_srcdir}/source/t2parser -I${top_srcdir}/source/bulkdata -I${top_srcdir}/source/scheduler -I${top_srcdir}/source/ccspinterface -I${PKG_CONFIG_SYSROOT_DIR}$(includedir) -I${PKG_CONFIG_SYSROOT_DIR}/usr/src/googletest/googlemock/include -I${RDK_PROJECT_ROOT_PATH}/$(GLIB_CFLAGS) -I${PKG_CONFIG_SYSROOT_DIR}$(includedir)/glib-2.0 -I${PKG_CONFIG_SYSROOT_DIR}$(libdir)/glib-2.0/include

profilexconf_gtest_bin_LDFLAGS = -L/usr/src/googletest/googletest/lib/.libs -lgcov -L/src/googletest/googlemock/lib -L/usr/src/googletest/googlemock/lib/.libs -L/usr/include/glib-2.0 -lgmock -lcjson -lcurl -lmsgpackc -lgtest -lgtest_main -lglib-2.0

profilexconf_gtest_bin_LDFLAGS += -Wl,--wrap=sendReportOverHTTP -Wl,--wrap=sendCachedReportsOverHTTP

profilexconf_gtest_bin_SOURCES = = gtest_main.cpp profilexconfTest.cpp profilexconfMock.cpp SchedulerMock.cpp ../mocks/SystemMock.cpp ../mocks/FileioMock.cpp ../mocks/rdklogMock.cpp ../mocks/rbusMock.cpp ../../bulkdata/profilexconf.c ../../utils/vector.c ../../utils/t2log_wrapper.c ../../utils/t2common.c ../../utils/t2collection.c ../../utils/persistence.c ../../bulkdata/t2markers.c ../../reportgen/reportgen.c ../../dcautil/legacyutils.c

profile_gtest_bin_CPPFLAGS = -I$(PKG_CONFIG_SYSROOT_DIR)/usr/include/gtest -I$(PKG_CONFIG_SYSROOT_DIR)/usr/include/glib-2.0 -I$(PKG_CONFIG_SYSROOT_DIR)/usr/lib/x86_64-linux-gnu/glib-2.0/include -I$(PKG_CONFIG_SYSROOT_DIR)/usr/local/lib -I$(PKG_CONFIG_SYSROOT_DIR)$(includedir)/gtest -I${top_srcdir}/gtest/include -I${top_srcdir}/source/include -I${top_srcdir}/source -I${top_srcdir}/source/test/mocks -I${top_srcdir}/source/test/rbus -I${top_srcdir}/source/test/rdk_logger -I${top_srcdir}/include -I${top_srcdir}/source/utils -I${top_srcdir}/source/privacycontrol -I${PKG_CONFIG_SYSROOT_DIR}$(includedir)/rbus -I${top_srcdir}/source/dcautil -I${top_srcdir}/source/ccspinterface -I${top_srcdir}/source/reportgen -I${top_srcdir}/source/xconf-client -I${top_srcdir}/source/protocol/http -I${top_srcdir}/source/protocol/rbusMethod -I${top_srcdir}/source/t2parser -I${top_srcdir}/source/bulkdata -I${top_srcdir}/source/scheduler -I${top_srcdir}/source/ccspinterface -I${PKG_CONFIG_SYSROOT_DIR}$(includedir) -I${PKG_CONFIG_SYSROOT_DIR}/usr/src/googletest/googlemock/include -I${RDK_PROJECT_ROOT_PATH}/$(GLIB_CFLAGS) -I${PKG_CONFIG_SYSROOT_DIR}$(includedir)/glib-2.0 -I${PKG_CONFIG_SYSROOT_DIR}$(libdir)/glib-2.0/include

profile_gtest_bin_SOURCES = gtest_main.cpp ../mocks/SystemMock.cpp ../mocks/FileioMock.cpp ../mocks/rdklogMock.cpp ../mocks/rbusMock.cpp ../mocks/rdkconfigMock.cpp ../mocks/VectorMock.cpp SchedulerMock.cpp ../../bulkdata/profile.c profileTest.cpp ../../utils/persistence.c ../../utils/t2common.c ../../utils/t2collection.c ../../utils/t2MtlsUtils.c ../../utils/t2log_wrapper.c ../../dcautil/dcautil.c ../../dcautil/dca.c ../../dcautil/legacyutils.c ../../dcautil/dcaproc.c ../../xconf-client/xconfclient.c ../../protocol/rbusMethod/rbusmethodinterface.c ../../privacycontrol/rdkservices_privacyutils.c ../../reportgen/reportgen.c ../../bulkdata/t2eventreceiver.c ../../bulkdata/t2markers.c ../../t2parser/t2parser.c ../../bulkdata/datamodel.c ../../t2parser/t2parserxconf.c ../../bulkdata/reportprofiles.c ../../bulkdata/profilexconf.c ../../ccspinterface/rbusInterface.c ../../ccspinterface/busInterface.c ../../protocol/http/curlinterface.c

profile_gtest_bin_LDFLAGS = -L/usr/src/googletest/googletest/lib/.libs -lgcov -L/src/googletest/googlemock/lib -L/usr/src/googletest/googlemock/lib/.libs -L/usr/include/glib-2.0 -lgmock -lcjson -lcurl -lmsgpackc -lgtest -lgtest_main -lglib-2.0

42 changes: 42 additions & 0 deletions source/test/bulkdata/datamodelMock.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright 2020 Comcast Cable Communications Management, LLC

Check failure on line 2 in source/test/bulkdata/datamodelMock.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'source/test/bulkdata/datamodelMock.cpp' (Match: xmidt-org/webpa-common/1.11.0, 12 lines, url: https://github.com/xmidt-org/webpa-common/archive/v1.11.0.tar.gz, file: basculechecks/capabilitycheck_test.go)

Check failure on line 2 in source/test/bulkdata/datamodelMock.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'source/test/bulkdata/datamodelMock.cpp' (Match: comcast/dns-over-https-translator/0.0.0-20200909195218-7341ef11c4a3, 14 lines, url: https://proxy.golang.org/github.com%2Fcomcast%2Fdns-over-https-translator/@v/v0.0.0-20200909195218-7341ef11c4a3.zip, file: pkg/controller/options.go)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <cjson/cJSON.h>
#include "test/bulkdata/datamodelMock.h"



// Mock Method
extern "C" void __wrap_ReportProfiles_ProcessReportProfilesBlob(cJSON *profiles_root, bool rprofiletypes)
{
if (!g_datamodelMock)
{
return;
}
return g_datamodelMock->ReportProfiles_ProcessReportProfilesBlob(profiles_root, rprofiletypes);
}

extern "C" void __wrap_ReportProfiles_ProcessReportProfilesMsgPackBlob(char *msgpack_blob, int msgpack_blob_size)
{
if (!g_datamodelMock)
{
return;
}
return g_datamodelMock->ReportProfiles_ProcessReportProfilesMsgPackBlob(msgpack_blob, msgpack_blob_size);
}

Loading
Loading