Document the Release 2 driver in the README and tidy DDS/Plugins

- Rewrite README.md around new_docker_build_release2.sh: Release 2
  scope (4 build groups, 61 targets), Ninja/RelWithDebInfo configure,
  the 22-test ctest baseline, DEB production via
  rpmbuild/make_rpm_ubuntu26_release2.py, options reference,
  troubleshooting and known quirks (the legacy validation-scope driver
  is no longer documented as the main flow).
- Remove leftover blank lines and stale explanatory comments in
  Lts/DDS/Generic (dynamic_data_reader.h, generic_base.h),
  Lts/DDS/QosProfile (DDS_DefaultQos.cpp/.h, CMakeLists.txt) and
  Lts/Plugins/CMakeLists.txt.
This commit is contained in:
berrux-dev committed 2026-11-17 20:14:47 +01:00
1 parent 84f8cfb41f
commit b18ac87565
7 files changed
+207 -233

No files matched your search

@@ -88,7 +88,6 @@ class DynamicDataReader final
try
{
const std::string topicName =
specialTopicName.empty() ? DDS::Helper::getShortTopicName(m_structType->name()) : specialTopicName;
@@ -117,20 +116,16 @@ class DynamicDataReader final
}
dds::sub::qos::DataReaderQos dataReaderQos = ddsSubscriber.default_datareader_qos();
QString typeName = QString::fromStdString(m_structType->name());
if (typeName.endsWith(QLatin1String("Request")) || typeName.endsWith(QLatin1String("Reply")))
{
dds::core::policy::Durability readerDurability;
dataReaderQos >> readerDurability;
readerDurability.kind(dds::core::policy::DurabilityKind_def::VOLATILE);
dataReaderQos << readerDurability;
}
m_dataReader =
DataReader(ddsSubscriber, m_ddsTopic, dataReaderQos, nullptr, dds::core::status::StatusMask::all());
m_dataReader = DataReader(ddsSubscriber, m_ddsTopic, dataReaderQos, nullptr, dds::core::status::StatusMask::all());
if (m_dataReader == nullptr)
{
ERROR_LOG(m_logger) << "Creating dataReader for '" << topicName << "' with type: '"
@@ -145,7 +140,6 @@ class DynamicDataReader final
}
DEBUG_LOG(m_logger) << "dataReader created (" << m_structType->name() << ")";
return true;
}
@@ -219,16 +213,13 @@ class DynamicDataReader final
}
auto copy = m_newSamplesDuringRead;
m_newSamplesDuringRead.clear();
for (auto& sample : copy)
{
readData(rti::sub::LoanedSample<DynamicData>(sample.sample, &sample.info), m_dataReader->topic_name(),
callbackFunc);
delete sample.sample;
}
return checkDisposedInstances(callbackFunc);
}
@@ -270,9 +261,7 @@ class DynamicDataReader final
SampleStruct ss;
ss.sample = new DynamicData(sample.data());
ss.info = sample.info();
m_newSamplesDuringRead.emplace_back(ss);
bSeenNewSamples = true;
}
}
@@ -297,7 +286,6 @@ class DynamicDataReader final
if (sample.info().valid())
readData(sample, m_dataReader->topic_name(), callbackFunc);
}
return true;
}
@@ -65,9 +65,6 @@ namespace Helper
{
DDSGEN_EXPORT std::string getFunctionTopicName(const std::string &fqName);
DDSGEN_EXPORT std::string getShortTopicName(const std::string &fqName);
DDSGEN_EXPORT QMetaMethod getMethod(NGL::INGLLogger &logger,
QObject *objectToInform,
const char *slotToExecute,
@@ -25,11 +25,6 @@ NGL_ADD_LIBRARY2(AAR SV HLA WS ddsQoS SHARED ${SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(ddsQoS
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/../../
# Consumers (the generated *_topic_type_plugin.cpp) include
# DDS_DefaultQos.h -> ddsqos_export.h; the export header is generated
# into the binary dir, so export it the same way ddsfts exports its
# ddsfts_export.h. Without this every <svc>TopicTypePlugin target fails
# to compile ("ddsqos_export.h: No such file or directory").
${CMAKE_CURRENT_BINARY_DIR}
)
NGL_TARGET_LINK_LIBRARIES(ddsQoS
@@ -7,9 +7,7 @@
*/
#include "DDS_DefaultQos.h"
#include <QtCore/QUrl>
#include <ngltools/ngltools_filesystem.h>
#include <NGLLogger/NGLLoggerBootstrap.h>
@@ -41,7 +39,6 @@ bool setDefault(const QStringList &qosFileList)
try
{
dds::core::StringSeq urls;
urls.reserve(qosStr.size());
for (const QString &file : qosStr)
@@ -54,9 +51,7 @@ bool setDefault(const QStringList &qosFileList)
rti::core::QosProviderParams qosProviderParams = defaultProvider->default_provider_params();
qosProviderParams.url_profile(urls);
defaultProvider->default_provider_params(qosProviderParams);
print(defaultProvider, logger);
}
catch (const dds::core::Exception &ex)
{
@@ -68,7 +63,6 @@ bool setDefault(const QStringList &qosFileList)
static QString fixupSchemeName(const QUrl &url)
{
QString str = url.toString();
str = str.replace(QLatin1String("tcpv4lan"), QLatin1String("tcpv4_lan"));
return QStringLiteral("0@") + str;
@@ -105,7 +99,6 @@ dds::domain::qos::DomainParticipantQos domainParticipantDefault(ConnectionType t
dpQos = defaultProvider.participant_qos("LtsProfiles::DomainParticipant.Tcp");
if (tcpConnectionUrl.scheme() == QLatin1String("tcpv4lan"))
{
rti::core::policy::Discovery discovery;
dpQos >> discovery;
const dds::core::StringSeq seq({fixupSchemeName(tcpConnectionUrl).toStdString()});
@@ -114,7 +107,6 @@ dds::domain::qos::DomainParticipantQos domainParticipantDefault(ConnectionType t
}
else
{
rti::core::policy::Property props;
dpQos >> props;
props.set({"dds.transport.TCPv4.tcp1.server_bind_port", std::to_string(tcpConnectionUrl.port(7400))});
@@ -201,36 +193,24 @@ dds::sub::qos::DataReaderQos dataReaderDefault( ConnectionType conType)
default:
break;
}
return drQos;
}
void print(dds::core::QosProvider provider, NGL::INGLLogger &logger)
{
print(provider.participant_qos(), logger);
print(provider.datawriter_qos(), logger);
print(provider.datareader_qos(), logger);
}
void print(const dds::domain::qos::DomainParticipantQos &qos, NGL::INGLLogger &logger)
{
DEBUG_LOG(logger) << "Qos for DomainParticipant: ";
printPolicyMap(qos->property.get_all(), logger);
}
void print(const dds::sub::qos::DataReaderQos &readerQos, NGL::INGLLogger &logger)
{
DEBUG_LOG(logger) << "Qos for dataReader: ";
DEBUG_LOG(logger) << "resourceLimit.max_samples " << readerQos->resource_limits.max_samples();
printPolicyMap(readerQos->property.get_all(), logger);
@@ -238,7 +218,6 @@ void print(const dds::sub::qos::DataReaderQos &readerQos, NGL::INGLLogger &logge
void print(const dds::pub::qos::DataWriterQos &writerQos, NGL::INGLLogger &logger)
{
DEBUG_LOG(logger) << "Default Qos for dataWriter: ";
DEBUG_LOG(logger) << "ReliabilityKind: " << writerQos->reliability->kind();
DEBUG_LOG(logger) << "Publish mode: " << writerQos->publish_mode.kind();
@@ -47,8 +47,6 @@ DDSQOS_EXPORT dds::pub::qos::DataWriterQos dataWriterDefault(TopicType type);
DDSQOS_EXPORT dds::sub::qos::DataReaderQos dataReaderDefault(TopicType type);
DDSQOS_EXPORT dds::sub::qos::DataReaderQos dataReaderDefault(ConnectionType conType);
DDSQOS_EXPORT dds::domain::qos::DomainParticipantQos domainParticipantShmUdp();
DDSQOS_EXPORT dds::domain::qos::DomainParticipantQos domainParticipantShmUdpLocalhost();
DDSQOS_EXPORT dds::domain::qos::DomainParticipantQos domainParticipantShm();
@@ -6,9 +6,6 @@
# Add Services directory to include path for all plugins
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../Services/)
# (Stale include_directories for Release-2-pruned modules - AudioVideoManagement,
# GuezNasat, Viewer/LtsDataView, OperatorManagement, TopicEditorBase - removed:
# the paths no longer exist and only produced -Wmissing-include-dirs warnings.)
# Add NGLLogger stub headers
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../include/NGLLogger/)
# Add LtsSession stub headers
+206 -186
View File
@@ -1,47 +1,58 @@
# qt6-migrated-legatus — build and run, step by step
Build guide for the Qt6-migrated legatus tree on the release
**validation-scope** branch. Everything runs inside a prebuilt Docker
image; the host only needs Docker.
Build guide for the Qt6-migrated legatus tree on the **Release 2**
branch. Everything runs inside a prebuilt Docker image; the host only
needs Docker.
## Scope
What `new_docker_build.sh` builds and packages:
`new_docker_build_release2.sh` builds the Release 2 scope in four
groups (all ON by default, toggle with `--groupN` / `--no-groupN`):
| Area | Contents |
|---|---|
| `TetraIF/` | `CoPrtCnv`, `LogView`, `PrtCnv` (+ `unit-test/` — see Step 3) |
| `Z/src/` | NGL application/core library stack (NGLLogger, nglcoreapplication, …) |
| `Lts/Common/` | LTS common libraries (LtsCoordTrans, LtsLicence, LtsUtils, …) |
| `Lts/Proxies/TrainingAreaBase` | `tabTelegrams` library, built as a TetraIF dependency |
| Group | Area | Contents |
|---|---|---|
| GROUP1 (AP4) | DDS middleware | `ddscore`, `ddsftccore`, `ddsfts`, `ddsgen`, `ddsQoS`, `ddsconnector` (+ `ddscore_unit_test`, `ddsqos_unit_test`) |
| GROUP3 (AP3) | Lts services + core stack | NGL library stack (NGLLogger, nglcoreapplication, nglcompression, …), Lts/Common libraries (LtsCoordinate, LtsCoordTrans, LtsSession, LtsLicence, …), TetraIF modules (CoPrtCnv, LogView, PrtCnv) and all their test executables |
| GROUP5 (AP9) | Viewer / tools | `ddsview`, `LogViewer`, `sqlbrowser` (+ `logviewer_unit_test`, `sqlbrowser_unit_test`) |
| GROUP6 (AP9) | Generators | `ngl_codegen` |
**61 targets** in total, built one by one
(`cmake --build ../build --target <t> -j$(nproc)`).
Entries at the tree root:
- `new_docker_build.sh` — build driver (image build, compile, ctest, DEB packaging)
- `Dockerfile` — recipe of the prebuilt build image (Ubuntu 26.04 + Qt 6.10.2 + deps)
- `rpmbuild/make_rpm_ubuntu26.py` — in-tree DEB package producer (self-contained)
- `jenkins-ci-rme/` — in-tree copy of the Jenkins CI flow (see its own `README.md`)
- `../build/` — build tree, created by the driver **next to the tree**
(`qt6-after/build`), never inside it (git-ignored scratch area)
- `new_docker_build_release2.sh` — build driver (compile, ctest, DEB packaging)
- `rpmbuild/make_rpm_ubuntu26_release2.py` — in-tree DEB package producer (self-contained)
- `Dockerfile` — image recipe kept for the legacy validation-scope driver and for the `qt6-release-build-pipeline` DEB; the Release 2 driver carries the same recipe built in and builds the image automatically when it is missing
- `rti_license.dat` — RTI Connext DDS license, required by the DDS group (GROUP1)
- `jenkins-ci-rme/` — in-tree copy of the Jenkins CI flow (see its own `README.md`; still wired to the legacy driver, see Step 5)
- `../build/` — build tree, created by the driver **next to the tree** (`qt6-after/build`), never inside it (git-ignored scratch area)
Toolchain inside the image: **Ubuntu 26.04, GCC 15.2.0, Qt 6.10.2**
(`/opt/Qt/6.10.2/gcc_64`), C++17, Release build. No license file is
required.
(`/opt/Qt/6.10.2/gcc_64`), C++17 (set by the root `CMakeLists.txt`),
**Ninja**, `RelWithDebInfo`. The DDS group requires `rti_license.dat`
(checked in at the tree root); the driver exports `RTI_LICENSE` inside
the container.
## Prerequisites
1. **Docker** available on the host.
2. The tree must be reachable inside the container at
`/workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus`, i.e.
mount the tree's parent directory on `/workspace` — this is how
`new_docker_build.sh` invokes Docker (it mounts
`${MIGRATE_PIPELINE_ROOT}/..`), so running the driver as-is satisfies
this. The build tree then lives at `/workspace/build` in the container,
2. A `.envrc` in this directory defining `MIGRATE_PIPELINE_ROOT` — the
**pipeline root**, i.e. the directory that *contains*
`qt-migration-legatus/`. The driver mounts it at `/repo` in the
container (overridable with `--docker-mount-root`) and works in
`/repo/qt-migration-legatus/qt6-after/qt6-migrated-legatus`, so
running the driver as-is satisfies this. The build tree then lives
at `/repo/qt-migration-legatus/qt6-after/build` in the container,
which is `../build` next to the tree on the host.
The driver resolves the pipeline root from its own location (override
with the exported `MIGRATE_PIPELINE_ROOT` or the `.envrc` in this
directory).
`MIGRATE_PIPELINE_ROOT` resolution (highest precedence first):
exported environment variable → `.envrc` in this directory → the
script's own location.
The driver refuses to start if `.envrc` is missing, if
`MIGRATE_PIPELINE_ROOT` is unset or the directory does not exist, or if
`rti_license.dat` is missing while GROUP1 is ON.
All commands below are run **from this directory**
(`qt6-migrated-legatus/`).
@@ -49,256 +60,265 @@ All commands below are run **from this directory**
## Step 1 — Build the prebuilt Docker image (once)
```bash
./new_docker_build.sh --build-prebuilt-image --docker-image legatus-qt6:1.0
./new_docker_build_release2.sh --docker-image legatus-qt6:1.0
```
This builds the image from the in-tree `Dockerfile` (Ubuntu 26.04 base,
apt deps, Qt 6.10.2 via `aqtinstall`, KDReports from source). Re-run it
only after changing the `Dockerfile` or the `APT_PACKAGES` list in
`new_docker_build.sh`.
`--docker-image` selects the prebuilt-image mode: if the named image
does not exist yet, the driver builds it automatically from its
built-in recipe (Ubuntu 26.04 base, apt deps, Qt 6.10.2 via
`aqtinstall`, KDReports from source) and continues with the build.
The default image name is `qt6-migrated-legatus-release2`. This driver
has no `--build-prebuilt-image` / `--delete-prebuilt-image` options —
manage the image with plain `docker` if needed.
To remove it later:
## Step 2 — Build the Release 2 scope
```bash
./new_docker_build.sh --delete-prebuilt-image --docker-image legatus-qt6:1.0
./new_docker_build_release2.sh --docker-image legatus-qt6:1.0 \
> build.log 2>&1
```
## Step 2 — Compile the release scope
What the driver does:
```bash
./new_docker_build.sh --docker-image legatus-qt6:1.0
```
What the driver does inside the container:
1. `rm -rf ../build && mkdir -p ../build && cd ../build` (fresh build tree,
next to the source tree)
2. Configure with CMake:
1. Validates the environment (`.envrc`, `MIGRATE_PIPELINE_ROOT`,
`rti_license.dat` for GROUP1) and starts a container with
`-v ${MIGRATE_PIPELINE_ROOT}:/repo` and working directory
`/repo/qt-migration-legatus/qt6-after/qt6-migrated-legatus`.
2. Inside the container, it wipes and reconfigures the build tree next
to the source tree:
```bash
cmake /workspace/qt6-migrated-legatus \
rm -rf ../build && mkdir -p ../build
cmake -B ../build -G Ninja \
-DBUILD_TESTING=ON \
-DRELEASE_BUILD=ON \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=/opt/Qt/6.10.2/gcc_64:/usr/local
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_PREFIX_PATH=/opt/Qt/6.10.2/gcc_64 \
-DCMAKE_CXX_FLAGS="-DRTI_LINUX -DRTI_UNIX" \
-DCMAKE_C_FLAGS="-DRTI_LINUX -DRTI_UNIX" \
-DBUILD_RTI=ON \
-DBUILD_GROUP1=ON -DBUILD_GROUP3=ON -DBUILD_GROUP5=ON -DBUILD_GROUP6=ON \
# + packaging/coverage pass-through variables (see Troubleshooting)
```
(`RELEASE_BUILD=ON` selects the release scope; everything else is at
its CMake default.)
3. `make -j8` the release-scope targets (TetraIF modules, Z stack,
Lts/Common libraries, all test executables — the list is
`RELEASE_BUILD_TARGETS` in `new_docker_build.sh`).
4. Run **ctest** (see Step 3).
3. Builds the 61 group targets in order (GROUP1 → GROUP3 → GROUP5 →
GROUP6).
4. Runs **ctest** (see Step 3).
Output to inspect after the run:
- `../build/release_build.log` — full make output (the build must end with
**0 warnings**)
- `../build/bin/` — executables (apps)
- `../build/bin/unit-test/` — test and ctest binaries
- `../build/bin/` — executables (apps: `ddsview`, `LogView`,
`LogViewer`, `PrtCnv`, `sqlbrowser`, `ngl_codegen`, …)
- `../build/bin/unit-test/` — the 22 test executables
- `../build/lib/` — shared libraries
To rebuild incrementally without a fresh tree, run `make` directly in an
interactive container against the existing `../build/`:
To rebuild incrementally without a fresh tree, run the build directly
in an interactive container against the existing `../build/`:
```bash
docker run --rm -it -v /path/to/pipeline-root:/workspace legatus-qt6:1.0 \
bash -c 'cd /workspace/qt-migration-legatus/qt6-after/build \
&& make -j8'
docker run --rm -it -v /path/to/pipeline-root:/repo legatus-qt6:1.0 \
bash -c 'cd /repo/qt-migration-legatus/qt6-after/build \
&& cmake --build . -j$(nproc)'
```
## Run an executable directly
To run a built executable interactively — e.g. the GUI apps under
`../build/bin/` (`LogView`, `PrtCnv`) against your local display — start a
shell inside the container with X11 forwarding:
`../build/bin/` (`ddsview`, `LogViewer`, `sqlbrowser`) against your
local display — start a shell inside the container with X11 forwarding:
```bash
docker run --rm -it \
-e DISPLAY \
-e LC_ALL=C.UTF-8 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /path/to/pipeline-root:/workspace \
-v /path/to/pipeline-root:/repo \
legatus-qt6:1.0 \
bash -c 'cd /workspace/qt-migration-legatus/qt6-after/build && exec bash'
bash -c 'cd /repo/qt-migration-legatus/qt6-after/build && exec bash'
```
## Step 3 — Run the tests
### 3.1 ctest (automatic)
`new_docker_build.sh` already runs `ctest --test-dir ../build
--output-on-failure` after the compile. Expected baseline (7 tests, all
passed):
The driver runs ctest after the compile (skip with `--no-ctest`): it
`cd`s into `../build`, sets `QT_QPA_PLATFORM=offscreen` and prepends
the system Qt plugin dir to `QT_PLUGIN_PATH`
(`/usr/lib/x86_64-linux-gnu/qt6/plugins` — where the system
`libkf6texttemplate-dev` package installs `ktexttemplate_defaulttags`,
needed by `GrantleeParserSmoke`; the `/opt/Qt` install does not search
it), then runs `ctest --output-on-failure -j$(nproc)`.
| # | Test | Result |
A failing test does not fail the driver run (it logs and continues).
Expected baseline — **22 tests, all passed**:
| # | Test | Area |
|---|---|---|
| 1 | `coprtcnv_unit_test` | Passed |
| 2 | `logview_unit_test` | Passed |
| 3 | `prtcnv_unit_test` | Passed |
| 4 | `NGLToolsQtSmoke` | Passed |
| 5 | `test_nglpdfwidget` | Passed |
| 6 | `lts_coord_trans_unit_test` | Passed |
| 7 | `aes_crypt_test` | Passed |
| 1 | `coprtcnv_unit_test` | TetraIF/CoPrtCnv — telegrams, fragmentation |
| 2 | `logview_unit_test` | TetraIF/LogView — `IntegerCalculator` |
| 3 | `prtcnv_unit_test` | TetraIF/PrtCnv — fragmented-telegram handling |
| 4 | `wms_json_ds_unit_test` | Z/wms_json_ds |
| 5 | `nglcoreapplication_unit_test` | Z/nglcoreapplication |
| 6 | `nglsettings_unit_test` | Z/nglsettings |
| 7 | `NGLToolsQtSmoke` | Z/ngltools — Qt smoke (binary `ngltools_qt_smoke`) |
| 8 | `ngltools_unit_test` | Z/ngltools |
| 9 | `test_nglpdfwidget` | Z/nglwidgets — PDF widget |
| 10 | `ngllogger_unit_test` | Z/NGLLogger |
| 11 | `logviewer_unit_test` | Lts/LogViewer |
| 12 | `sqlbrowser_unit_test` | Lts/SQLBrowser |
| 13 | `ddsqos_unit_test` | Lts/DDS/QosProfile |
| 14 | `ddscore_unit_test` | Lts/DDS core |
| 15 | `GrantleeParserSmoke` | Lts/Common/CodeGen — KTextTemplate parsing (binary `grantlee_parser_smoke`) |
| 16 | `codegen_unit_test` | Lts/Common/CodeGen |
| 17 | `commandlineparser_unit_test` | Lts/Common — command-line parser |
| 18 | `lts_coord_trans_unit_test` | Lts/Common/LtsCoordTrans |
| 19 | `ltscoordinate_unit_test` | Lts/Common/LtsCoordinate |
| 20 | `aes_crypt_test` | Lts/Common/LtsLicence — AES |
| 21 | `ltssession_unit_test` | Lts/LtsSession |
| 22 | `utils_test` | Lts/Common/LtsUtils |
### 3.2 Build the unit tests only
```bash
docker run --rm -v /path/to/pipeline-root:/workspace legatus-qt6:1.0 \
bash -c 'cd /workspace/qt-migration-legatus/qt6-after/build \
&& make -j8 coprtcnv_unit_test logview_unit_test prtcnv_unit_test'
```
### 3.3 Run a test executable directly
### 3.2 Run a test executable directly
GUI-free tests need the offscreen Qt platform in a headless container:
```bash
docker run --rm -it -v /path/to/pipeline-root:/workspace legatus-qt6:1.0 \
docker run --rm -it -v /path/to/pipeline-root:/repo legatus-qt6:1.0 \
bash -c 'export QT_QPA_PLATFORM=offscreen
cd /workspace/qt-migration-legatus/qt6-after/build
./bin/unit-test/coprtcnv_unit_test # CoPrtCnv: telegrams, fragmentation, helpers
./bin/unit-test/logview_unit_test # LogView: IntegerCalculator
./bin/unit-test/prtcnv_unit_test # PrtCnv: PrtCnvMember fragmented-telegram handling
./bin/unit-test/lts_coord_trans_unit_test
./bin/unit-test/aes_crypt_test
./bin/unit-test/test_nglpdfwidget
export QT_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt6/plugins
cd /repo/qt-migration-legatus/qt6-after/build
./bin/unit-test/utils_test # LtsUtils: byte access, strings, …
./bin/unit-test/coprtcnv_unit_test
# or everything registered:
ctest --output-on-failure'
```
Each QtTest binary accepts a single slot name to run just one test,
e.g. `./bin/unit-test/coprtcnv_unit_test radioTelegramFragmentationRoundtrip`.
e.g. `./bin/unit-test/utils_test byteAccess`.
### 3.4 TetraIF unit tests (`TetraIF/unit-test/`)
| Test | Module covered | Note |
|---|---|---|
| `coprtcnv_unit_test` | `CoPrtCnv` — central & radio telegram header fields, payload access, length checks, fragmentation/reassembly roundtrip, id→string helpers | links `CoPrtCnv` |
| `logview_unit_test` | `LogView` — `IntegerCalculator` (arithmetic, precedence, error codes, variables) | compiles `LogView/IntegerCalculator.cpp` into the test (the class otherwise lives in the LogView executable) |
| `prtcnv_unit_test` | `PrtCnv` — `PrtCnvMember` state + fragmented-telegram add/reassembly | compiles `PrtCnv/PrtCnvMember.cpp` into the test because `PrtCnvLib` is built with hidden visibility (its symbols are not linkable from outside) |
Sources are registered with ctest via `TetraIF/unit-test/CMakeLists.txt`
and packaged into the ctest DEBs (see Step 4).
Note: ctest reads the absolute paths embedded in the build tree at
configure time — run it against `../build` with the **same mount
prefix** the configure used (the driver mounts the pipeline root at
`/repo`).
## Step 4 — Produce the release DEB packages
```bash
export WORKSPACE=/path/to/pipeline-root # e.g. ~/release/qt6-migration-pipeline
export PROJECT=guez
export OS_VERSION=26.04
./new_docker_build.sh --docker-image legatus-qt6:1.0 \
./new_docker_build_release2.sh --docker-image legatus-qt6:1.0 \
--run-jenkins-builder \
--package-output-dir "${WORKSPACE}/rpms/${PROJECT}/${OS_VERSION}/" \
> /path/to/build.log 2>&1
```
(export the variables *before* the command — command-prefix variables are
not expanded in the same command's arguments.)
(Export `PROJECT`, `LTS_VERSION`, `BUILD_NUMBER`, `BUILD_TAG`,
`GUEZ_MODE` *before* the command if you want non-default package
metadata — command-prefix variables are not expanded in the same
command's arguments.)
The driver compiles the release scope, runs ctest, then stages the tree
and runs the in-tree `rpmbuild/make_rpm_ubuntu26.py`, which produces 5
DEBs in `${WORKSPACE}/rpms/${PROJECT}/${OS_VERSION}/`:
The driver compiles the scope, runs ctest, then stages the tree (tar)
into `<pipeline-root>/deb_stage/` and runs the in-tree
`rpmbuild/make_rpm_ubuntu26_release2.py` (`-c LTS`, IPO + unity build,
`BUILD_RTI=ON`, all 61 targets), which produces 5 DEBs in
`<pipeline-root>/rpms/<project>/<os-version>/`:
| DEB | Contents |
|---|---|
| `qt6-release-runtime_*` | runtime libraries + the release-scope executables |
| `qt6-release-sources_*` | release-scope sources |
| `qt6-release-ctest-runtime_*` | test executables under `/usr/lib/ctest/` (incl. the TetraIF unit tests) |
| `qt6-release-ctest-sources_*` | test sources (files with "test" in the name under the release dirs, incl. `TetraIF/unit-test/*.cpp`) |
| `qt6-release-build-pipeline_*` | the in-tree pipeline files (`new_docker_build.sh`, `Dockerfile`, `CMakeLists.txt`, `rpmbuild/`, `jenkins-ci-rme/`) under `/usr/src/pipeline/` |
| `qt6-release-ctest-runtime_*` | test executables |
| `qt6-release-ctest-sources_*` | test sources |
| `qt6-release-build-pipeline_*` | the in-tree pipeline files (driver, `Dockerfile`, `CMakeLists.txt`, `rpmbuild/`, `jenkins-ci-rme/`) |
A copy of the DEBs is also placed in `<pipeline-root>/packages-out/`
(same-file skip guarded by device:inode).
Note: `--package-output-dir` is currently passed through to CMake as an
unused variable — the DEB locations above are fixed under the pipeline
root, not at `--package-output-dir`.
Verify a package:
```bash
dpkg -c "${WORKSPACE}/rpms/guez/26.04/qt6-release-ctest-runtime_1.0-1_amd64.deb" \
dpkg -c "<pipeline-root>/rpms/guez/26.04/qt6-release-ctest-runtime_1.0-1_amd64.deb" \
| grep unit_test
dpkg -i "${WORKSPACE}/rpms/guez/26.04/"*.deb # install locally, if wanted
```
A copy of the DEBs is also placed in the container's
`/workspace/packages-out` mount (same-file skip guarded by device:inode).
## Step 5 — CI / Jenkins flow (optional)
The in-tree `jenkins-ci-rme/` directory contains the full Jenkins
pipeline (`Jenkinsfile`, builder, publisher) adapted to this tree. For a
local dry run of the same flow without Jenkins:
```bash
jenkins-ci-rme/release-16-10-2026.sh
```
See `jenkins-ci-rme/README.md` for the pipeline details.
pipeline (`Jenkinsfile`, builder, publisher) adapted to this tree.
**Note:** it is still wired to the legacy `new_docker_build.sh`
driver and has not been switched to `new_docker_build_release2.sh`
yet. See `jenkins-ci-rme/README.md` for the pipeline details.
## Step 6 — Code coverage (lcov)
```bash
export WORKSPACE=/path/to/pipeline-root # e.g. ~/release/qt6-migration-pipeline
export PROJECT=guez
export OS_VERSION=26.04
./new_docker_build.sh --docker-image legatus-qt6:1.0 \
--run-coverage \
--coverage-output-dir "${WORKSPACE}/coverage/${PROJECT}/${OS_VERSION}/" \
> /path/to/coverage.log 2>&1
```
(export the variables *before* the command — command-prefix variables are
not expanded in the same command's arguments.)
The driver builds the release scope with `-O0 --coverage`, runs the same ctest
suite, then captures the data with lcov: the report covers the release scope
(`TetraIF`, `Z/src`, `Lts/Common`, `Lts/Proxies/TrainingAreaBase`), and test
sources are filtered out of the report, so the percentages reflect the module
code.
Artifacts in the coverage output directory:
| File | Contents |
|---|---|
| `html/index.html` | browsable report (line + branch coverage per file) |
| `coverage.info` | machine-readable lcov tracefile |
| `coverage_summary.txt` | whole-scope totals |
`--run-coverage` is mutually exclusive with `--run-jenkins-builder` (different
instrumentation of the same build tree).
The Jenkins pipeline runs the same step on every build (`RunCoverage`
parameter, on by default) and archives the report as build artifacts under
`coverage/<project>/<os>/`; the local dry run
(`jenkins-ci-rme/release-16-10-2026.sh`) does the same, with
`DRYRUN_COVERAGE=OFF` to skip coverage there.
`--run-coverage` is available and is mutually exclusive with
`--run-jenkins-builder`. In the current tree it only passes
`-DRUN_COVERAGE=ON` / `-DCOVERAGE_OUTPUT_DIR` to the configure — those
variables are not consumed by any `CMakeLists.txt` yet, so no lcov
data is collected. The option is kept for the (still to be wired)
coverage step.
## Options reference
`./new_docker_build.sh --help` prints the full option list. The main
ones:
`./new_docker_build_release2.sh --help` prints the full option list.
The main ones:
| Option | Default | Purpose |
|---|---|---|
| `--docker-image IMAGE` | `legatus-qt6:1.0` | image to use/build/delete |
| `--build-prebuilt-image` | — | build the image from `./Dockerfile` and exit |
| `--delete-prebuilt-image` | — | delete the image and exit |
| `--group1` / `--no-group1` | ON | DDS middleware group (AP4) |
| `--group3` / `--no-group3` | ON | Lts services + core stack (AP3) |
| `--group5` / `--no-group5` | ON | Viewer tools (AP9) |
| `--group6` / `--no-group6` | ON | Generators (AP9) |
| `--no-ctest` | — | skip the ctest step |
| `--tests-only` | — | see Known quirks |
| `--use-prebuilt-image` / `--no-prebuilt-image` | off | prebuilt image mode (`--docker-image` turns it on) |
| `--docker-image IMAGE` | `qt6-migrated-legatus-release2` | image to use (auto-built if missing) |
| `--cmake_build_flags FLAGS` | — | extra `-D` flags appended to the configure |
| `--docker-mount-root PATH` | `/repo` | container-side mount root |
| `--run-jenkins-builder` | off | produce the DEB packages (Step 4) |
| `--package-output-dir DIR` | `./packages-out` | where the DEBs are written |
| `--package-output-dir DIR` | `./packages-out` | pass-through (see Step 4 note) |
| `--lts-version / --project / --build-number / --build-tag` | `1.0` / `guez` / `1` / `manual-build` | package metadata |
| `--run-coverage` | off | coverage build + lcov report (Step 6) |
| `--coverage-output-dir DIR` | `./coverage-out` | where the coverage report is written |
| `--run-coverage` | off | coverage flag pass-through (Step 6) |
| `--coverage-output-dir DIR` | `./coverage-out` | pass-through (see Step 6) |
Environment overrides: `DOCKER_IMAGE`, `RUN_JENKINS_BUILDER`,
`PACKAGE_OUTPUT_DIR`, `RUN_COVERAGE`, `COVERAGE_OUTPUT_DIR`, `PROJECT`,
`LTS_VERSION`, `GUEZ_MODE`, `BUILD_NUMBER`, `BUILD_TAG`,
Environment overrides: `BUILD_GROUP1/3/5/6`, `RUN_CTEST`, `TESTS_ONLY`,
`USE_PREBUILT_IMAGE`, `DOCKER_IMAGE`, `CMAKE_BUILD_FLAGS`,
`DOCKER_MOUNT_ROOT`, `GUEZ_MODE`, `RUN_JENKINS_BUILDER`,
`PACKAGE_OUTPUT_DIR`, `LTS_VERSION`, `PROJECT`, `BUILD_NUMBER`,
`BUILD_TAG`, `RUN_COVERAGE`, `COVERAGE_OUTPUT_DIR`,
`MIGRATE_PIPELINE_ROOT`.
## Troubleshooting
- **"Manually-specified variables were not used"** at configure —
expected. The driver passes packaging/coverage variables
(`BUILD_GROUP1/3/5/6`, `RUN_JENKINS_BUILDER`, `PACKAGE_OUTPUT_DIR`,
`PROJECT`, `BUILD_NUMBER`, `BUILD_TAG`, `RUN_COVERAGE`,
`COVERAGE_OUTPUT_DIR`) that no `CMakeLists.txt` reads yet.
`BUILD_RTI` **is** consumed.
- **"no Qt platform plugin could be initialized"** when running a test
binary by hand → `export QT_QPA_PLATFORM=offscreen`.
binary by hand → `export QT_QPA_PLATFORM=offscreen` (plus the
`QT_PLUGIN_PATH` from Step 3).
- **`GrantleeParserSmoke`: `ktexttemplate_defaulttags` not found** →
run ctest/tests with the system plugin dir prepended (Step 3).
- **Stale build tree** → the driver always recreates `../build/`; for
manual builds delete `../build/` and rerun Step 2 if CMake behaves oddly.
- **DEBs not on the host** → the output dir must be a path that exists
*on the host* (it is bind-mounted into the container as
`/workspace/packages-out`); check the `package-output-dir` argument.
manual builds delete `../build/` and rerun Step 2 if CMake behaves
oddly.
- **ctest "No tests were found"** → the pipeline root was mounted at a
different path than the configure used; the build tree embeds
absolute paths.
- **Wrong pipeline root** → the driver mounts `MIGRATE_PIPELINE_ROOT`
at `/repo`; it must be the directory that *contains*
`qt-migration-legatus/`, not the tree itself.
- **`rti_license.dat not found`** → GROUP1 (DDS) requires the license;
it is checked in at the tree root (or place it at the pipeline root).
## Known quirks
- `--tests-only` is documented in `--help` as "run only ctest, skip all
build groups", but the current implementation only skips the ctest
step; the group builds still run.
- The legacy driver `new_docker_build.sh` (validation scope) is kept in
the tree and is still used by `jenkins-ci-rme/`; its in-tree
`Dockerfile` recipe does not include `libbz2-dev` (BZip2), which the
Release 2 driver's built-in recipe does.