diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2019-01-16 13:48:21 +0100 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2019-01-16 13:50:49 +0000 |
commit | e507e1bad78cef11c1772a0a37ce33d230b99ab3 (patch) | |
tree | b38e0f2e7f7822182e7a8f69789f6293b37e3730 /src/tools/testrunner | |
parent | aa9c8a208ac10de3b2163511e285baff723a9bff (diff) | |
download | qtapplicationmanager-e507e1bad78cef11c1772a0a37ce33d230b99ab3.tar.gz |
Don't show the qml specific -help options the appman-qmltestrunner can't support
As we partially use the same code than the original qmltestrunner, we
also reuse the parsing logic and the help output.
The QML specific options can't be supported by appman that's why we
don't show them now.
Change-Id: Icb20330a1a67a22c42855e7866c09d4cf8a5d14c
Fixes: AUTOSUITE-612
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
Diffstat (limited to 'src/tools/testrunner')
-rw-r--r-- | src/tools/testrunner/testrunner.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tools/testrunner/testrunner.cpp b/src/tools/testrunner/testrunner.cpp index 5eb77c7b..9d4c4e9f 100644 --- a/src/tools/testrunner/testrunner.cpp +++ b/src/tools/testrunner/testrunner.cpp @@ -59,6 +59,7 @@ QT_BEGIN_NAMESPACE namespace QTest { extern Q_TESTLIB_EXPORT bool printAvailableFunctions; + extern Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml); } QT_END_NAMESPACE @@ -168,7 +169,12 @@ void TestRunner::initialize(const QStringList &testRunnerArguments) QuickTestResult::setCurrentAppname(testArgV.constFirst()); QuickTestResult::setProgramName(testArgV.constFirst()); - QuickTestResult::parseArgs(testArgV.size(), testArgV.data()); + + // Allocate a QuickTestResult to create QBenchmarkGlobalData, otherwise the benchmark options don't work + QuickTestResult result; + // We would call QuickTestResult::parseArgs here, but that would include qml options in the help + // which we don't support + QTest::qtest_qParseArgs(testArgV.size(), testArgV.data(), false /*no qml options*/); qputenv("QT_QTESTLIB_RUNNING", "1"); // Register the test object and application-manager test add-on |