Clion Autotools

 

CLion incorporates two language engines, the built-in one and the Clangd -based one, both working in parallel.

The Clangd-based engine detects warnings and errors to be shown in the editor and provides quick-fixes, performs certain navigation actions, highlighting, and completion, while CLion's own engine is used for other code insight features like refactorings. You can adjust the scope of Clangd functionality in Clangd settings.

The following table shows how the two engines handle CLion features by default:

Qt Creator, CodeLite, and CLion are probably your best bets out of the 24 options considered. 'Great syntax highlighting and auto-completion ' is the primary reason people pick Qt Creator over the competition. This page is powered by a knowledgeable community that. Λ conan install libcurl/[email protected]/stable Configuration: settings arch =x8664 archbuild =x8664 buildtype =Release compiler =Visual Studio compiler.runtime=MD compiler.version=15 os =Windows osbuild =Windows options buildrequires env libcurl/[email protected]/stable: Not found in local cache, looking in remotes. Libcurl/[email protected]/stable: Trying with 'conan.

IDE featureLanguage engine
Syntax highlightingClangd
Errors/warnings and quick-fixesClangd
CompletionClangd only, both, or built-in only *
Formatting: ClangFormatClangd
Formatting: Code Style settingsBuilt-in engine
NavigationBoth **
Parameter hintsClangd
RefactoringsBuilt-in engine

*- As selected in Clangd settings.

CLion is an IDE for C and C developed by JetBrains. Besides, it supports Python and Web technologies (JavaScript, HTML, XML, CSS, etc.) and has a variety of plugins for other languages (like Go or Swift, for example). About CLion How does CLion match against competing tools? Product features comparison Marketing / Market / Community comparison. Drake ('dragon' in Middle English) is a C toolbox started by the Robot Locomotion Group at the MIT Computer Science and Artificial Intelligence Lab (CSAIL). The development team has now grown significantly, with core development led by the Toyota Research Institute.

**- Both engines are used. Clangd helps with highlighting references at caret, Go to declaration, Go to definition, Quick documentation, Quick definition, Find Usages.

Language standards compliance

CLion fully supports C++11, C++14, C++17, and partially C++20.

Support for C++11 and C++14 is provided by the built-in engine. It also supports a part of the C++17 features, while the rest of them are provided by Clangd.

Support for the C++20 standard relies on Clangd except for parsing and refactorings (handled by the built-in engine). Three more words pdf free download. Besides, the built-in engine extends the Clangd's support for C++20 Concepts (see the dedicated article for details).

The tables below give an overview of the standards support status, and the details of C++20 and C+17 support.

StandardClangd (CXX_status)Built-in engine
C++20Partial support
  • Parsing and refactorings for the features supported by Clangd

  • Extended support for Concepts (based on Clangd): custom highlighting, code completion, dedicated inspections, Rename refactoring, navigation actions like Go to Definition and Find Usages.

C++17Full support starting Clang 5Partial support
C++14Full supportFull support
C++11Full supportFull support
Language featureClang support statusError highlighting and quick-fixesCompletionNavigationParsingRefactorings
Default member initializers for bit-fields (P0683R1)+ClangdClangdMixed, relying on Clangd--
const& -qualified pointers to members(P0704R1)+ClangdClangdMixed, relying on Clangd--
Allow lambda-capture [=, this] (P0409R2)+ClangdClangdMixed, relying on Clangd--
__VA_OPT__ for preprocessor comma elision (P0306R4, P1042R1)+ClangdClangdMixed, relying on Clangd--
Designated initializers (P0329R4)+ClangdClangdMixed, relying on Clangd--
template-parameter-list for generic lambdas (P0428R2)+ClangdClangdMixedBuilt-in engine-
Concepts: P0734R0P0857R0P1084R2P1141R2P1616R1P1452R2+ClangdClangdMixedBuilt-in engineBuilt-in engine, Rename only
Concepts: P0848R3P1972R0P1980R0P2103R0P2092R0P2113R0------
Range-based for statements with initializer (P0614R1)+ClangdClangdMixedBuilt-in engineBuilt-in engine
ADL and function templates that are not visible (P0846R0)+ClangdClangdMixed, relying on Clangd--
const mismatch with defaulted copy constructor (P0641R2)+ClangdClangdMixed, relying on Clangd--
Consistent comparison (operator<=> ): P0515R3P0905R1P1120R0P1185R2P1186R3P1630R1P1946R0P1959R0+ClangdClangdMixedBuilt-in engine-
Consistent comparison (operator<=> ): P2002R1Partial-----
Consistent comparison (operator<=> ): P2085R0------
Access checking on specializations (P0692R1)Partial-----
Default constructible and assignable stateless lambdas (P0624R2)+ClangdClangdMixed, relying on Clangd--
Lambdas in unevaluated contexts (P0315R4)------
[[no_unique_address]] attribute (P0840R2)+ClangdClangdMixedBuilt-in engine-
[[likely]] and [[unlikely]] attributes (P0479R5)+Built-in engineBuilt-in engineBuilt-in engineBuilt-in engine-
typename optional in more contexts (P0634R3)------
Pack expansion in lambda init-capture (P0780R2)+ClangdClangdMixedBuilt-in engine-
Class types as non-type template parameters (P0732R2, P1907R1PartialClangdClang---
Destroying operator delete (P0722R3)+ClangdClangdMixed, relying on Clangd--
Relaxations of constexpr restrictions (P1064R0, P1002R1, P1327R1, P1330R0, P1331R2, P1668R1, P0784R7)+ClangdClangdMixed, relying on Clangd--
Prohibit aggregates with user-declared constructors (P1008R1)+ClangdClangdMixed, relying on Clangd--
Feature test macros (P0941R2)+ClangdClangdMixed, relying on Clangd--
explicit(bool) (P0892R2)+ClangdClangdMixedBuilt-in engineBuilt-in engine
Signed integers are two's complement (P1236R1)+ClangdClangdMixed, relying on Clangd--
char8_t (P0482R6)+ClangdClangdMixedBuilt-in engine-
Immediate functions (consteval) (P1073R3, P1937R2)+ClangdClangdMixedBuilt-in engine-
std::is_constant_evaluated (P0595R2)+ClangdClangdMixed, relying on Clangd--
Nested inline namespaces (P1094R2)+ClangdClangdMixed, relying on Clangd--
Structured binding extensions (P1091R3, P1381R1)Partially-----
Stronger Unicode requirements (P1041R4, P1139R2)+ClangdClangdMixed, relying on Clangd--
Parenthesized initialization of aggregates (P0960R3, P1975R0)------
Modules: P1766R1 (DR)+ (Clang 11)-----
Modules: (P1874R1 ), P2115R0, P1103R3Partially-----
Modules: P1979R0, P1779R3, P1857R3, P1815R2, P1811R0, P1703R1------
Coroutines (P0912R5)PartiallyClangdClangdMixedBuilt-in engine-
Deprecate a[b,c] (P1161R3)+ClangdClangdMixed, relying on Clangd--
Deprecate some problematic uses of volatile (P1152R4)+ClangdClangdMixed, relying on Clangd--
[[nodiscard('with reason')]] (P1301R4)+ClangdClangdMixed, relying on Clangd--
using enum (P1099R5)------
Class template argument deduction for aggregates (P1816R0, P2082R1)------
Class template argument deduction for alias templates (P1814R0)------
Permit conversions to arrays of unknown bound (P0388R4)------
constinit (P1143R2)+ClangdClangdMixedBuilt-in engine-
Pseudo-destructors end object lifetimes P0593R6 (DR)+ (Clang 11)-----
Language featureError highlighting and quick-fixesCompletionNavigationRefactorings
auto non-type parametersClangdClangdMixed, relying on Clangd-
UTF-8 character literalsClangdClangdMixed, relying on Clangd-
lambda capture of *thisClangdClangdMixed, relying on Clangd-
[[nodiscard]] attributeClangdClangdMixed, relying on Clangd-
[[fallthrough]] attributeClangdClangdMixed, relying on Clangd-
[[maybe_unused]] attributeClangdClangdMixed, relying on Clangd-
'noexcept' as part of a function typeClangdClangdMixed, relying on Clangd-
one-argument static assertClangdClangdMixed, relying on Clangd-
if constexprClangdClangdMixed, relying on Clangd-
inline variablesClangdClangdMixed, relying on Clangd-
new rules for auto deduction from braced-init-listClangdClangdMixed, relying on Clangd-
constexpr lambdasClangdClangdMixed, relying on Clangd-
nested namespace definitionClangdClangd only, both, or built-in only *Mixed **Build-in engine
fold expressionsClangdClangd only, both, or built-in only *Mixed **-
class template argument deductionClangdClangd only, both, or built-in only *Mixed **-
__has_includeClangdClangd--

*- As selected in Clangd settings.

**- Both engines are used. Clangd helps with highlighting references at caret, Go to declaration, Go to definition, Quick documentation, Quick definition, Find Usages.

C++ code inspections

CLion performs static analysis on your C/C++ code using a set of inspections, configurable in Settings / Preferences Editor Inspections C/C++. Some of the C/C++ inspections are provided by Clangd, while the others work as part of the built-in engine.

The table below shows which engine is used for a particular inspection or a set of inspections. Note that Objective-C checks are not listed except for those with similar Clang diagnostics.

InspectionProvided by
Data flow analysisClangd
FunctionsBuild-in engine
General: Argument selection defectsClangd
General: Clang-tidyClangd or built-in, as selected
General: Unconstrained variable typeBuilt-in engine (based on Clangd)
General: Empty declaration or statementClangd
General: Format specifiersFor C/C++, this check is covered by Clang’s -Wformat diagnostic.
General: '=' in conditional expressionFor C/C++, this check is covered by Clang’s -Wparentheses diagnostic.
General: Inconsistent namingBuilt-in engine
General: Missing switch caseFor C/C++, this check is covered by Clang’s -Wswitch diagnostic.
General: Simplifiable statementClangd
General: Virtual call from constructor or destructorClangd
Unused code: Unused conceptBuilt-in engine (based on Clangd)
Unused code: Unused expression resultFor C/C++, this check is covered by Clangd’s DFA.
Unused code: Unused global declarationClangd
Unused code: Unused include directiveClangd
Unused code: Unused macroClangd
Unused code: Unused structClangd
Unused code: Unused template parameterClangd
Unused code: Unused type aliasClangd

This section is a comprehensive guide for development of Kurento itself. The intended reader of this text is any person who wants to get involved in writing code for the Kurento project, or to understand how the source code of this project is structured.

If you are looking to write applications that make use of Kurento, then you should read Writing Kurento Applications.

Table of Contents

This is an overview of the tools and technologies used by KMS:

  • The code is written in C and C++ languages.

  • The code style is heavily influenced by that of Gtk and GStreamer projects.

  • CMake is the build tool of choice, and is used to build all modules.

  • Source code is versioned in several GitHub repositories.

  • The officially supported platforms are Long-Term Support (LTS) versions of Ubuntu: Ubuntu 16.04 (Xenial) and Ubuntu 18.04 (Bionic) (64-bits only).

  • The GStreamer multimedia framework sits at the heart of Kurento Media Server.

  • In addition to GStreamer, KMS uses other libraries like boost, jsoncpp, libnice, etc.

Kurento source code is stored in several GitHub repositories at https://github.com/Kurento. Each one of these repositories has a specific purpose and usually contains the code required to build a shared library of the same name.

An overview of the relationships between all repos forming the Kurento Media Server:

As the dependency graph is not strictly linear, there are multiple possible ways to order all modules into a linear dependency list; this section provides one possible ordered list, which will be consistently used through all Kurento documents.

Fork repositories:

KMS depends on several Open Source libraries, the main one being GStreamer. Sometimes these libraries show specific behaviors that need to be tweaked in order to be useful for KMS; other times there are bugs that have been fixed but the patch is not accepted at the upstream source for whatever reason. In these situations, while the official path of feature requests and/or patch submit is still tried, we have created a fork of the affected libraries.

  • gstreamer (produces libgstreamer1.5)

  • libnice (produces gstreamer1.0-nice, gstreamer1.5-nice)

Main repositories

  • kurento-module-creator: It is a code generation tool for generating code scaffolding for plugins. This code includes KMS code and Kurento client code. It has mainly Java code.

  • kms-cmake-utils: Contains a set of utilities for building KMS with CMake.

  • kms-jsonrpc: Kurento protocol is based on JsonRpc, and makes use of a JsonRpc library contained in this repository. It has C++ code.

  • kms-core: Contains the core GStreamer code. This is the base library that is needed for other libraries. It has 80% C code and a 20% C++ code.

  • kms-elements: Contains the main elements offering pipeline capabilities like WebRtc, Rtp, Player, Recorder, etc. It has 80% C code and a 20% C++ code.

  • kms-filters: Contains the basic video filters included in KMS. It has 65% C code and a 35% C++ code.

  • kurento-media-server: Contains the main entry point of KMS. That is, the main() function for the server executable code. This program depends on libraries located in the above repositories. It has mainly C++ code.

Extra repositories

KMS is distributed with some basic GStreamer pipeline elements, but other elements are available in form of modules.These modules are demos of what third party modules could be written and integrated into Kurento. These are just for instructional purposes, and shouldn’t be used in production servers.

Omni-Build repository

This repository is a special project because it is designed to build all KMS Main repositories from a single entry point. This repo brings the other KMS Main repositories as Git submodules: it makes KMS development easier because if you build this project, you don’t need to manually install the libraries of the other KMS Main repositories. However, all other development and support libraries must still be installed manually.

Client repositories

Application Servers can be developed in Java, JavaScript with Node.js, or JavaScript directly in the browser. Each of these languages have their support tools made available in their respective repositories.

Clion autotools project
  • kurento-client-js (Node.js Application Servers, browser JavaScript)

  • kurento-java (Java Application Servers)

Tutorial or demo repositories

There are several repositories that contain sample code for developers that use Kurento or want to develop a custom Kurento module. Currently these are:

A KMS developer must know how to work with KMS Fork and Main repositories and understand that each of these have a different development life cycle. The majority of development for KMS will occur at theK MS Main repositories, while it’s unusual to make changes in Fork repositories except for updating their upstream versions.

KMS is a C/C++ project developed with an Ubuntu system as main target, which means that its dependency management and distribution is based on the Debian package system.

It is not a trivial task to configure the compiler to use a set of libraries because a library can be composed of several .so and .h files. To make this task easier, pkg-config is used when compiling programs and libraries. In short: when a library is installed in a system, it registers itself in the pkg-config database with all its required files, which allows to later query those values in order to compile with the library in question.

For example, if you want to compile a C program which depends on GLib 2.0, you can run:

In a Debian/Ubuntu system, development libraries are distributed as Debian packages which are made available in public package repositories. When a C or C++ project is developed in these systems, it is usual to distribute it also in Debian packages. It is then possible to install them with apt-get, which will handle automatically all the package’s dependencies.

When a library is packaged, the result usually consists of several packages. These are some pointers on the most common naming conventions for packages, although they are not always strictly enforced by Debian or Ubuntu maintainers:

  • bin package: Package containing the binary files for the library itself. Programs are linked against them during development, and they are also loaded in production. The package name starts with lib, followed by the name of the library.

  • dev package: Contains files needed to link with the library during development. The package name starts with lib and ends with -dev. For example: libboost-dev or libglib2.0-dev.

  • dbg package: Contains debug symbols to ease error debugging during development. The package name starts with lib and ends with -dbg. For example: libboost-dbg.

  • doc package: Contains documentation for the library. Used in development. The package name starts with lib and ends with -doc. For example: libboost-doc.

  • src package: Package containing the source code for the library. It uses the same package name as the bin version, but it is accessed with the command apt-getsource instead of apt-getinstall.

There are several tools for building C/C++ projects: Autotools, Make, CMake, Gradle, etc. The most prominent tool for building projects is the Makefile, and all the other tools tend to be simply wrappers around this one. KMS uses CMake, which generates native Makefiles to build and package the project. There are some IDEs that recognize CMake projects directly, such as JetBrains CLion or Qt Creator.

A CMake projects consists of several CMakeLists.txt files, which define how to compile and package native code into binaries and shared libraries. These files also contain a list of the libraries (dependencies) needed to build the code.

To specify a dependency it is necessary to know how to configure this library in the compiler. The already mentioned pkg-config tool is the standard de-facto for this task, so CMake comes with the ability to use pkg-config under the hood. There are also some libraries built with CMake that use some specific CMake-only utilities.

To work directly with KMS source code, or to just build KMS from sources, the easiest way is using the module kms-omni-build. Just follow these steps:

  1. Install required tools, like Git.

  2. Add the Kurento repository to your system configuration.

  3. Clone kms-omni-build.

  4. Install build dependencies: tools like GCC, CMake, etc., and KMS development libraries.

  5. Build with CMake and Make.

  6. Run the newly compiled KMS.

  7. Run KMS tests.

This command will install the basic set of tools that are needed for the next steps:

Run these commands to add the Kurento repository to your system configuration:

Run:

Run:

Note

--recursive and --remote are not used together, because each individual submodule may have their own submodules that might be expected to check out some specific commit, and we don’t want to update those.

OPTIONAL: Change to the master branch of each submodule, if you will be working with the latest version of the code:

You can also set REF to any other branch or tag, such as REF=6.12.0. This will bring the code to the state it had in that version release.

Make sure your current directory is already kms-omni-build, then run this command:

By default, the script kms-build-run.sh will set up the environment and settings to make a Debug build of KMS. You can inspect that script to learn about all the other options it offers, including builds for AddressSanitizer, selection between GCC and Clang compilers, and other modes.

You can set the logging level of specific categories by exporting the environment variable GST_DEBUG before running this script (see Debug Logging).

To leave the system in a clean state, remove all KMS packages and related development libraries. Run this command and, for each prompted question, visualize the packages that are going to be uninstalled and press Enter if you agree. This command is used on a daily basis by the development team at Kurento with the option --yes (which makes the process automatic and unattended), so it should be fairly safe to use. However we don’t know what is the configuration of your particular system, and running in manual mode is the safest bet in order to avoid uninstalling any unexpected package.

Run:

Whenever working with KMS source code itself, of during any analysis of crash in either the server or any 3rd-party library, you’ll want to have debug symbols installed. These provide for full information about the source file name and line where problems are happening; this information is paramount for a successful debug session, and you’ll also need to provide these details when requesting support or filing a bug report.

Installing the debug symbols does not impose any extra load to the system. So, it doesn’t really hurt at all to have them installed even in production setups, where they will prove useful whenever an unexpected crash happens to bring the system down and a postmortem stack trace is automatically generated.

After having installed Kurento, first thing to do is to enable the Ubuntu’s official Debug Symbol Packages repository:

Now, install all debug symbols that are relevant to KMS:

Let’s see a couple examples that show the difference between the same stack trace, as generated before installing the debug symbols, and after installing them. Don’t report a stack trace that looks like the first one in this example:

NOT USEFUL: WITHOUT debug symbols:

USEFUL WITH debug symbols:

The second stack trace is much more helpful, because it indicates the exact file names and line numbers where the crash happened. With these, a developer will at least have a starting point where to start looking for any potential bug.

It’s important to note that stack traces, while helpful, are not a 100% replacement of actually running the software under a debugger (GDB) or memory analyzer (Valgrind). Most crashes will need further investigation before they can be fixed.

Clion Autotools

GDB is a debugger that helps in understanding why and how a program is crashing. Among several other things, you can use GDB to obtain a backtrace, which is a detailed list of all functions that were running when the Kurento process failed.

You can build KMS from sources and then use GDB to execute and debug it. Alternatively, you can also use GDB with an already installed version of KMS.

  1. Complete the previous instructions on how to build and run from sources: Build from sources.

  2. Install debug symbols: Install debug symbols.

  3. Build and run KMS with GDB.

    For this step, the easiest method is to use our launch script, kms-build-run.sh. It builds all sources, configures the environment, and starts up the debugger:

  4. Run GDB commands to start KMS and then get a backtrace (see indications in next section).

You don’t have to build KMS from sources in order to run it with the GDB debugger. Using an already existing installation is perfectly fine, too, so it’s possible to use GDB in your servers without much addition (apart from installing gdb itself, that is):

  1. Assuming a machine where KMS is installed, go ahead and also install gdb.

  2. Install debug symbols: Install debug symbols.

  3. Define the G_DEBUG environment variable.

    This helps capturing assertions from 3rd-party libraries used by Kurento, such as GLib and GStreamer:

  4. Load your service settings.

    You possibly did some changes in the KMS service settings file, /etc/default/kurento-media-server. This file contains shell code that can be sourced directly into your current session:

  5. Ensure KMS is not already running as a service, and run it with GDB.

  6. Run GDB commands to start KMS and then get a backtrace (see indications in next section).

Once you see the (gdb) command prompt, you’re already running a GDB session, and you can start issuing debug commands. Here, the most useful ones are backtrace and info variants (Examining the Stack). When you want to finish, stop execution with Ctrl+C, then type the quit command:

Explaining GDB usage is out of scope for this documentation, but just note one thing: in the above text, frame3 is just an example; depending on the case, the backtrace needs to be examined first to decide which frame number is the most interesting. Typically (but not always), the interesting frame is the first one that involves Kurento’s own code instead of 3rd-party code.

These are the two typical workflows used to work with fork libraries:

This workflow has the easiest and fastest setup, however it also is the slowest one. To make a change, you would edit the code in the library, then build it, generate Debian packages, and lastly install those packages over the ones already installed in your system. It would then be possible to run KMS and see the effect of the changes in the library.

This is of course an extremely cumbersome process to follow during anything more complex than a couple of edits in the library code.

The other work method consists on changing the system library path so it points to the working copy where the fork library is being modified. Typically, this involves building the fork with its specific tool (which often is Automake), changing the environment variable LD_LIBRARY_PATH, and running KMS with such configuration that any required shared libraries will load the modified version instead of the one installed in the system.

This allows for the fastest development cycle, however the specific instructions to do this are very project-dependent. For example, when working on the GStreamer fork, maybe you want to run GStreamer without using any of the libraries installed in the system (see https://cgit.freedesktop.org/gstreamer/gstreamer/tree/scripts/gst-uninstalled).

[TODO: Add concrete instructions for every forked library]

You can easily create Debian packages (.deb files) for KMS itself and for any of the forked libraries. Typically, Deb packages can be created directly by using standard system tools such as dpkg-buildpackage or debuild, but in order to integrate the build process with Git, we based our tooling on gbp (git-buildpackage).

All Kurento packages are normally built in our CI servers, using a script aptly named kurento-buildpackage. When running this tool inside any project’s directory, it will configure Kurento repositories, install dependencies, and finally use git-buildpackage to update the debian/changelog file, before actually building new Deb packages.

You can also use kurento-buildpackage locally, to build test packages while working on any of the Kurento projects; default options will generally be good enough. However, note that the script assumes all dependencies to either be installable from current Apt repositories, or be already installed in your system. If you want to allow the script to install any Kurento dependencies that you might be missing, run it with --install-kurento<KurentoVersion>, where <KurentoVersion> is the version of Kurento against which the project should be built.

For example, say you want to build the current kms-core development branch against Kurento 6.12.0. Run these commands:

Run kurento-buildpackage.sh--help, to read about what are the dependencies that you’ll have to install to use this tool, and what are the command-line flags that can be used with it.

Clion Autotools

In an attempt to make it easier than ever to create Deb packages from Kurento repositories, we offer a Docker image that already contains everything needed to run the kurento-buildpackage tool. You can use this Docker image as if you were running the script itself, with the advantage that your system won’t have to be modified to install any dependencies, your builds will be completely repeatable, and you will be able to create packages for different versions of Ubuntu.

To use the kurento-buildpackage Docker image, you’ll need to bind-mount the project directory onto the /hostdir path inside the container. All other options to kurento-buildpackage remain the same.

For example, say you want to build the current kms-core development branch against Kurento 6.12.0, for Ubuntu 16.04 (Xenial) systems. Run these commands:

KMS uses the Check unit testing framework for C (https://libcheck.github.io/check/). If you are developing KMS and building from sources, you can build and run unit tests manually: just change the last one of the build commands from make to makecheck. All available tests will run, and a summary report will be shown at the end.

Note

It is recommended to first disable GStreamer log colors, that way the resulting log files won’t contain extraneous escape sequences such as ^[[31;01m^[[00m. Also, it could be useful to specify a higher logging level than the default; set the environment variable GST_DEBUG, as explained in Logging levels and components.

The complete command would look like this:

The log output of the whole test suite will get saved into the file ./Testing/Temporary/LastTest.log. To find the starting point of each individual test inside this log file, search for the words “test start”. For the start of a specific test, search for “{TestName}: test start”. For example:

To build and run one specific test, use make{TestName}.check. For example:

If you want to analyze memory usage with Valgrind, use make{TestName}.valgrind. For example:

Clion Autotools Project

Debian tools will automatically run unit tests as part of the package creation process. However, for special situations during development, we might want to temporarily disable testing before creating an experimental package. For example, say you are investigating an issue, and want to see what happens if you force a crash in some point of the code; or maybe you want to temporarily change a module’s behavior but it breaks some unit test.

It is possible to skip building and running unit tests automatically, by editing the file debian/rules and changing the auto_configure rule from -DGENERATE_TESTS=TRUE to -DGENERATE_TESTS=FALSE-DDISABLE_TESTS=TRUE.

Add or change it in these files:

  • debian/control.

  • CMakeLists.txt.

  1. Fork the repository.

  2. Create a .build.yaml file in this repository, listing its project dependencies (if any).

  3. Add dependency to debian/control in the project that uses it.

  4. Add dependency to CMakeLists.txt in the project that uses it.

What to do when you are developing a new feature that spans across KMS and the public API? This is a summary of the actions done in CI by adm-scripts/kurento_generate_java_module.sh and adm-scripts/kurento_maven_deploy.sh:

  1. Work on your changes, which may include changing the KMS files where the Kurento API is defined.

  2. Generate client SDK dependencies:

  3. Generate client SDK:

  4. At this point, the new Java packages have been generated and installed in the local repository. Your Java application can now make use of any changes that were introduced in the API.

  • Some unit tests can fail, especially if the storage server (which contains some required input files) is having connectivity issues. If tests fail, packages are not generated. To skip tests, edit the file debian/rules and change -DGENERATE_TESTS=TRUE to -DGENERATE_TESTS=FALSE-DDISABLE_TESTS=TRUE.