6#include <QtCore/QCommandLineParser>
7#include <QtCore/QStringList>
25 std::unique_ptr<QCommandLineParser>
parser;
84#ifdef QGC_UNITTEST_BUILD
103#ifdef QGC_UNITTEST_BUILD
111void overrideCommandLine(
int& argc,
char**& argv);
CommandLineParseResult parse(int argc, char *argv[])
Parse command-line arguments with automatic QCoreApplication management.
AppMode determineAppMode(const CommandLineParseResult &args)
Determine the application mode from parsed arguments.
std::optional< std::pair< uint, uint > > parseUnitTestShard(const QString &value)
Validate a –unittest-shard value of the form <index>/<count>.
std::optional< quint32 > parseSystemId(const QString &value)
Validate a –system-id value.
AppMode
Application execution mode.
@ Gui
Normal GUI application.
@ BootTest
Initialize and exit (for CI validation).
CommandLineParseResult parseCommandLine()
Parse command-line arguments (requires existing QCoreApplication).
static QStringList normalizeArgs(const QStringList &args)
Normalizes command-line arguments Converts colon-separated syntax (–option:value) to standard format ...
std::optional< int > handleParseResult(const CommandLineParseResult &result)
Handle early exit conditions (help, version, error).
Result of parsing command-line arguments.
std::optional< quint32 > systemId
bool quietWindowsAsserts
Windows only: Disable assert dialogs.
std::unique_ptr< QCommandLineParser > parser
bool listTests
List available tests and exit.
QStringList unknownOptions
std::optional< QString > loggingOptions
std::optional< QString > errorString
uint unitTestShardCount
Number of shards the test's functions are split into.
enum QGCCommandLineParser::CommandLineParseResult::Status statusCode
std::optional< QString > labelFilter
Filter tests by label (comma-separated).
uint stressUnitTestsCount
bool useSwRast
Windows/macOS: Force software rendering.
std::optional< QString > unitTestOutput
Output file for test results (JUnit XML).
bool clearSettingsOptions
uint unitTestShardIndex
1-based shard of the test's functions to run (0 = all functions)
bool onscreen
Show test windows on screen (skip offscreen override).