Skip to content

Rbus fix memory leak #705

Rbus fix memory leak

Rbus fix memory leak #705

Workflow file for this run

name: unit_tests
on:
push:
branches: [ main, 'rbus-**' ]
pull_request:
branches: [ main, 'rbus-**' ]
jobs:
all:
runs-on: ubuntu-latest
steps:
- name: Set up cache
id: cache
uses: actions/cache@v3
with:
path: |
build
install
key: ${{ runner.os }}-${{ github.sha }}
- name: Set up CMake
# 3.16.x To support flow control commands to be overridden.
# Installs in: find /opt -ipath *bin/cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.16.x'
- name: Install packages
run: >
sudo apt update && sudo apt install -y libcurl4-openssl-dev libgtest-dev lcov gcovr
- name: Checkout rbus
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
path: rbus
- name: Configure Rbus
if: steps.cache.outputs.cache-hit != 'true'
run: >
cmake
-S "${{github.workspace}}/rbus"
-B build/rbus
-DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install/usr"
-DBUILD_FOR_DESKTOP=ON
-DENABLE_UNIT_TESTING=ON
-DENABLE_CODE_COVERAGE=ON
-DCMAKE_BUILD_TYPE=Debug
- name: Build Rbus
if: steps.cache.outputs.cache-hit != 'true'
run: >
make -C build/rbus
- name: Install rbus
if: steps.cache.outputs.cache-hit != 'true'
run: >
make -C build/rbus install
- name: Start rtrouted
# nohup to keep it running.
run: |
cd install/usr
export PREFIX=$PWD
export LD_LIBRARY_PATH=$PREFIX/lib
nohup ./bin/rtrouted -f -l DEBUG > /tmp/rtrouted_log.txt &
- name: Run Unit test
run: |
cd install/usr
export PREFIX=$PWD
export LD_LIBRARY_PATH=$PREFIX/lib
nohup ./bin/rbusTestProvider >/tmp/plog.txt &
./bin/rbusTestConsumer -a
- name: Run multiRbusOpenMethod Unit Test
run: |
cd install/usr
export PREFIX=$PWD
export LD_LIBRARY_PATH=$PREFIX/lib
./bin/multiRbusOpenMethodProvider &
./bin/multiRbusOpenMethodConsumer &
- name: Run multiRbusOpenSubscribe Unit test
run: |
cd install/usr
export PREFIX=$PWD
export LD_LIBRARY_PATH=$PREFIX/lib
nohup ./bin/multiRbusOpenProvider >/tmp/log_multiRbusOpenProvider.txt &
./bin/multiRbusOpenConsumer
- name: Run multiRbusOpenGet Unit test
run: |
cd install/usr
export PREFIX=$PWD
export LD_LIBRARY_PATH=$PREFIX/lib
nohup ./bin/multiRbusOpenRbusGetProvider >/tmp/log_multiRbusOpenRbusGetProvider.txt &
./bin/multiRbusOpenRbusGetConsumer
- name: Run multiRbusOpenSet Unit test
run: |
cd install/usr
export PREFIX=$PWD
export LD_LIBRARY_PATH=$PREFIX/lib
nohup ./bin/multiRbusOpenRbusGetProvider >/tmp/log_multiRbusOpenRbusSetProvider.txt &
./bin/multiRbusOpenRbusSetConsumer
- name: Run Gtest Cases
run: |
cd build/rbus
nohup ./src/session_manager/rbus_session_mgr &
./unittests/rbus_gtest.bin
- name: Stop SessionManager
run: |
killall -9 rbus_session_mgr
- name: Stop rtrouted
run: |
killall -9 rtrouted
- name: Run CodeCoverage
run: |
rm -rf /tmp/rtrouted*
cd build/rbus
make rbusCodeCoverageUI