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

Unit test build fix #32

Merged
merged 8 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
12 changes: 12 additions & 0 deletions .github/scripts/rtrouted.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
export RBUS_ROOT=${HOME}/rbus
export RBUS_INSTALL_DIR=${RBUS_ROOT}/install
export RBUS_BRANCH=2105_sprint
sadhyama marked this conversation as resolved.
Show resolved Hide resolved
mkdir -p $RBUS_INSTALL_DIR
cd $RBUS_ROOT
git clone https://github.com/rdkcentral/rbus
cmake -Hrbus -Bbuild/rbus -DCMAKE_INSTALL_PREFIX=${RBUS_INSTALL_DIR}/usr -DBUILD_FOR_DESKTOP=ON -DCMAKE_BUILD_TYPE=Debug
make -C build/rbus && make -C build/rbus install
export PATH=${RBUS_INSTALL_DIR}/usr/bin:${PATH} && \
export LD_LIBRARY_PATH=${RBUS_INSTALL_DIR}/usr/lib:${LD_LIBRARY_PATH}
nohup rtrouted -f -l DEBUG > /tmp/rtrouted_log.txt &
24 changes: 22 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 Comcast Cable Communications Management, LLC
# SPDX-FileCopyrightText: 2023 Comcast Cable Communications Management, LLC
# SPDX-License-Identifier: Apache-2.0

name: CI
Expand Down Expand Up @@ -52,7 +52,27 @@ jobs:
- name: Build
working-directory: build
run: |
build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output make all test
ps aux
build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output make

- name: Get rtrouted Binary
working-directory: build
run: |
../.github/scripts/rtrouted.sh

- name: Unit tests run
working-directory: build
run: |
export RBUS_ROOT=${HOME}/rbus
export RBUS_INSTALL_DIR=${RBUS_ROOT}/install
export PATH=${RBUS_INSTALL_DIR}/usr/bin:${PATH}
export LD_LIBRARY_PATH=${RBUS_INSTALL_DIR}/usr/lib:${LD_LIBRARY_PATH}
./tests/test_mqttcm_component -a
./tests/test_mqttcm_timer -a

- name: Stop rtrouted
run: |
killall -9 rtrouted

- name: Merge GCOV Reports for Sonarcloud
working-directory: build
Expand Down
33 changes: 33 additions & 0 deletions .sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# SPDX-FileCopyrightText: 2023 Comcast Cable Communications Management, LLC
# SPDX-License-Identifier: Apache-2.0

# Reference:
# https://github.com/SonarSource/sonarcloud_example_go-sqscanner-travis/blob/master/sonar-project.properties


# =====================================================
# Standard properties
# =====================================================

sonar.organization=xmidt-org
sonar.projectKey=xmidt-org_mqttConnManager
sonar.projectName=mqttConnManager

sonar.sources=src

# =====================================================
# Meta-data for the project
# =====================================================

sonar.links.homepage=https://github.com/xmidt-org/mqttConnManager
sonar.links.ci=https://github.com/xmidt-org/mqttConnManager/actions
sonar.links.scm=https://github.com/xmidt-org/mqttConnManager
sonar.links.issue=https://github.com/xmidt-org/mqttConnManager/issues

# =====================================================
# Properties specific to C
# =====================================================
sonar.cfamily.build-wrapper-output=build/bw-output
sonar.cfamily.threads=2
sonar.cfamily.cache.enabled=false
sonar.coverageReportPaths=build/coverage.xml
Loading