Skip to content

test: Only build APM tests if APM is enabled - #14292

Merged
HTRamsey merged 1 commit into
mavlink:masterfrom
ThinkOrbital:hotfix-apm-custom-compilation
Apr 23, 2026
Merged

test: Only build APM tests if APM is enabled#14292
HTRamsey merged 1 commit into
mavlink:masterfrom
ThinkOrbital:hotfix-apm-custom-compilation

Conversation

@Ryanf55

@Ryanf55 Ryanf55 commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Description

Compilation of QGC fails on master if you use the custom folder with default options.
I used cmake, on Ubuntu 22, with default options for QGC.

/home/ryan/Dev/qgroundcontrol/test/Vehicle/APMAirframeComponentControllerTest.cc:6:10: fatal error: APMAirframeComponentController.h: No such file or directory
    6 | #include "APMAirframeComponentController.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[685/696] Building CXX object CMakeFiles/Custom-QGroundControl.dir/test/Vehicle/RequestMessageTest.cc.o
ninja: build stopped: subcommand failed.

You also see a linker error.

mold: error: undefined symbol: CMakeFiles/Custom-QGroundControl.dir/test/FactSystem/APMParameterMetaDataTest.cc.o: APMParameterMetaData::APMParameterMetaData(QObject*)
mold: error: undefined symbol: CMakeFiles/Custom-QGroundControl.dir/test/FactSystem/APMParameterMetaDataTest.cc.o: APMParameterMetaData::~APMParameterMetaData()
mold: error: undefined symbol: CMakeFiles/Custom-QGroundControl.dir/test/FactSystem/APMParameterMetaDataTest.cc.o: APMParameterMetaData::~APMParameterMetaData()
mold: error: undefined symbol: CMakeFiles/Custom-QGroundControl.dir/test/FactSystem/APMParameterMetaDataTest.cc.o: APMParameterMetaData::APMParameterMetaData(QObject*)
mold: error: undefined symbol: CMakeFiles/Custom-QGroundControl.dir/test/FactSystem/APMParameterMetaDataTest.cc.o: APMParameterMetaData::~APMParameterMetaData()
mold: error: undefined symbol: CMakeFiles/Custom-QGroundControl.dir/test/FactSystem/APMParameterMetaDataTest.cc.o: APMParameterMetaData::~APMParameterMetaData()
mold: error: undefined symbol: CMakeFiles/Custom-QGroundControl.dir/test/FactSystem/APMParameterMetaDataTest.cc.o: APMParameterMetaData::APMParameterMetaData(QObject*)
mold: error: undefined symbol: CMakeFiles/Custom-QGroundControl.dir/test/FactSystem/APMParameterMetaDataTest.cc.o: APMParameterMetaData::~APMParameterMetaData()
mold: error: undefined symbol: CMakeFiles/Custom-QGroundControl.dir/test/FactSystem/APMParameterMetaDataTest.cc.o: APMParameterMetaData::~APMParameterMetaData()
mold: error: undefined symbol: CMakeFiles/Custom-QGroundControl.dir/test/FactSystem/APMParameterMetaDataTest.cc.o: APMParameterMetaData::APMParameterMetaData(QObject*)
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/Build changes
  • Other

Testing

  • Tested locally
  • Added/updated unit tests
  • Tested with simulator (SITL)
  • Tested with hardware
git clone ...
cd qgroundcontrol
cp -r custom-example/  custom/
/home/ryan/Qt/6.10.0/gcc_64/bin/qt-cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake --build build

Platforms Tested

  • Linux
  • Windows
  • macOS
  • Android
  • iOS

Flight Stacks Tested

  • PX4
  • ArduPilot

Screenshots

Just clean compilation

Checklist

  • I have read the Contribution Guidelines
  • I have read the Code of Conduct
  • My code follows the project's coding standards
  • I have added tests that prove my fix/feature works
  • New and existing unit tests pass locally

Related Issues

Reported in discord a week ago, confirmed by another user.
https://discord.com/channels/674039678562861068/801596112557441025/1494391120627630090


By submitting this pull request, I confirm that my contribution is made under the terms of the project's dual license (Apache 2.0 and GPL v3).

Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
@codecov

codecov Bot commented Apr 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@bc2f219). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #14292   +/-   ##
=========================================
  Coverage          ?   26.12%           
=========================================
  Files             ?      765           
  Lines             ?    68288           
  Branches          ?    31601           
=========================================
  Hits              ?    17838           
  Misses            ?    37667           
  Partials          ?    12783           
Flag Coverage Δ
unittests 26.12% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc2f219...224323c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

Build Results

Platform Status

Platform Status Details
Linux Passed View
Windows Passed View
MacOS Passed View
Android Passed View

All builds passed.

Pre-commit

Check Status Details
pre-commit Failed (non-blocking) View

Pre-commit hooks: 4 passed, 38 failed, 7 skipped.

Test Results

linux-coverage: 85 passed, 0 skipped
linux-sanitizers: 85 passed, 0 skipped
Total: 170 passed, 0 skipped

Code Coverage

Coverage: 59.1%

No baseline available for comparison

Artifact Sizes

Artifact Size
QGroundControl 247.89 MB
QGroundControl-aarch64 177.33 MB
QGroundControl-installer-AMD64 134.85 MB
QGroundControl-installer-AMD64-ARM64 77.47 MB
QGroundControl-installer-ARM64 106.17 MB
QGroundControl-linux 341.29 MB
QGroundControl-mac 190.54 MB
QGroundControl-windows 190.56 MB
QGroundControl-x86_64 172.42 MB
No baseline available for comparison

Updated: 2026-04-21 22:10:35 UTC • Triggered by: Android

@HTRamsey
HTRamsey merged commit 3f57706 into mavlink:master Apr 23, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants