...
Dependencies (Ubuntu 24.04)
First, To install dependencies execute:
| Code Block |
|---|
| language | shell |
|---|
| title | Rialto dependencies |
|---|
|
sudo apt-get install libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio libyaml-cpp-dev
sudo apt-get install libjsoncpp-dev
sudo apt-get install libjson-perl libperlio-gzip-perl perl libgd-gd2-perl libcapture-tiny-perl libdatetime-perl
sudo apt-get install protobuf-compiler
sudo apt-get install clang-format-18
sudo apt-get install cppcheck
sudo apt-get install -y doxygen
sudo apt install -y graphviz
sudo apt-get install build-essential
sudo apt-get install cmake
sudo apt-get install libyaml-cpp-dev
sudo apt-get install valgrind
sudo apt-get install libc6-dbg
wget https://github.com/linux-test-project/lcov/releases/download/v2.0/lcov-2.0.tar.gz
tar -xf lcov-2.0.tar.gz
cd lcov-2.0
sudo make install |
...
| Code Block |
|---|
| language | shell |
|---|
| title | Useful UT options |
|---|
|
# Forward the output to file:python3 build_ut.py -f output_file.log
# Configure which suite tests you would like to run
# By not supplying this option, all test suites will be run
python3 build_ut.py -s serveripc
# Configure the googletest filter to use when running the tests
# For more details, see: https://github.com/google/googletest/blob/main/docs/advanced.md#running-a-subset-of-the-tests
./python3 build_ut.py -gf TestFilter#TestFilter
# e.g.
python3 build_ut.py -gf GstGenericPlayerTest.* |
Generate UT coverage report (it will appear in build directory):
| Code Block |
|---|
| language | shell |
|---|
| title | UT with coverage report |
|---|
|
python3 build_ut.py -cov |
Run UTs with Valgrind to check memory leaks
| Code Block |
|---|
| language | shell |
|---|
| title | Run UT with Valgrind |
|---|
|
python3 build_ut.py -val |
Component Tests
Running all CTs:
| Code Block |
|---|
| language | shell |
|---|
| title | Running all CTs |
|---|
|
python3 build_ct.py |
Useful options/flags are the same as in build_ut.py script
Clang-format
Before the commit code has to be formatted. To do that, execute those commands:
| Code Block |
|---|
| language | shell |
|---|
| title | Formatting the code |
|---|
|
find . -name "*.h" -not -path "./build/*" | xargs clang-format-18 -i --style=file
find . -name "*.cpp" -not -path "./build/*" | xargs clang-format-18 -i --style=file |
It will modify your local files to meet Rialto Coding Standards.
Cpplint
To check, if there are no Cpplint errors, execute this command:
| Code Block |
|---|
| language | shell |
|---|
| title | Running Cpplint |
|---|
|
python3 scripts/cpplint/cpplint.py -gf GstGenericPlayerTest.* |
Rialto-Gstreamer
tbd
Rialto-Ocdm
...
Cppcheck
To run Cppcheck, execute this command:
| Code Block |
|---|
| language | shell |
|---|
| title | Running Cppcheck |
|---|
|
cppcheck -q -ibuild --enable=all --output-file=cppcheck_report.txt --std=c++17 --suppress-xml=cppcheck_suppressions.xml --library=googletest . |
Native build
To build Rialto for x86-64 Linux machine, execute those commands:
| Code Block |
|---|
| language | shell |
|---|
| title | Native Rialto build |
|---|
|
cmake . -B build -DNATIVE_BUILD=ON -DRIALTO_BUILD_TYPE="Debug"
make -C build |
Rialto-Gstreamer
Dependencies
To install dependencies execute:
| Code Block |
|---|
| language | shell |
|---|
| title | Rialto Gstreamer dependencies |
|---|
|
sudo apt-get install libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio |
Unit Tests, Clang-format, Cpplint, Cppcheck
Running those commands is the same as for Rialto.
To build UTs, Rialto dependencies are required. If you modified the Rialto public interface, you have to specify the Rialto branch with -b option:
| Code Block |
|---|
| language | shell |
|---|
| title | Running Gstreamer UTs with custom Rialto branch |
|---|
|
python build_ut.py -b RIALTO_BRANCH_NAME |
If you run UTs in your rialto-gstreamer directory earlier, before this step you probably need to remove the outdated headers:
| Code Block |
|---|
| language | shell |
|---|
| title | Remove outdated Rialto headers |
|---|
|
rm -rf tests/third-party/include/* |
Native Build
Before building Rialto-Gstreamer native build, you have to do the native build of Rialto component and install the build output:
| Code Block |
|---|
| language | shell |
|---|
| title | Build and install Rialto Native |
|---|
|
BASE_DIR=$(pwd)
NATIVE_DIR=$BASE_DIR/native
cd rialto
cmake . -B build -DCMAKE_INSTALL_PREFIX=$NATIVE_DIR -DNATIVE_BUILD=ON -DRIALTO_BUILD_TYPE="Debug"
make -C build install |
When you do that, execute:
| Code Block |
|---|
| language | shell |
|---|
| title | Rialto Gstreamer native build |
|---|
|
cd rialto-gstreamer
cmake . -B build -DCMAKE_INCLUDE_PATH="${NATIVE_DIR}/include" -DCMAKE_LIBRARY_PATH="${NATIVE_DIR}/lib" -DNATIVE_BUILD=ON -DRIALTO_BUILD_TYPE="Debug"
make -C build |
Rialto-Ocdm
Dependencies
To install dependencies execute:
| Code Block |
|---|
| language | shell |
|---|
| title | Install Rialto OCDM Dependencies |
|---|
|
sudo apt-get install libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base |
Unit Tests, Clang-format, Cpplint, Cppcheck
Running those commands is the same as for Rialto.
To build UTs, Rialto dependencies are required. If you modified the Rialto public interface, you have to specify the Rialto branch with -b option:
| Code Block |
|---|
| language | shell |
|---|
| title | Running OCDM UTs with custom Rialto branch |
|---|
|
python build_ut.py -b RIALTO_BRANCH_NAME |
If you run UTs in your rialto-ocdm directory earlier, before this step you probably need to remove the outdated headers:
| Code Block |
|---|
| language | shell |
|---|
| title | Remove outdated Rialto headers |
|---|
|
rm -rf tests/third-party/include/* |
Native Build
Before building Rialto-Gstreamer native build, you have to do the native build of Rialto component and install the build output:
| Code Block |
|---|
| language | shell |
|---|
| title | Build and install Rialto Native |
|---|
|
BASE_DIR=$(pwd)
NATIVE_DIR=$BASE_DIR/native
cd rialto
cmake . -B build -DCMAKE_INSTALL_PREFIX=$NATIVE_DIR -DNATIVE_BUILD=ON -DRIALTO_BUILD_TYPE="Debug"
make -C build install |
When you do that, execute:
| Code Block |
|---|
| language | shell |
|---|
| title | Rialto OCDM Native Build |
|---|
|
cd rialto-ocdm
cmake . -B build -DCMAKE_INCLUDE_PATH="${NATIVE_DIR}/include" -DCMAKE_LIBRARY_PATH="${NATIVE_DIR}/lib" -DNATIVE_BUILD=ON -DRIALTO_BUILD_TYPE="Debug"
make -C build |