diff options
author | Andy Nichols <andy.nichols@qt.io> | 2018-04-25 16:38:18 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-04-27 07:33:24 +0000 |
commit | 74b36c043b1c0f6451b109baf5d8b2602812b183 (patch) | |
tree | d9ec7b18f7433b022c6d22aacd3c91d2373ea883 /tests | |
parent | 4f854ea58c68cd398319bfae4f8b56500b1e0794 (diff) |
Add support for the fuzzy flag
Ported from patch in qtbase
Change-Id: I63510185c07d4d3bb18658e9ffb3d68ff5d148da
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/q3dslancelot/baseline/qbaselinetest.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/q3dslancelot/baseline/qbaselinetest.cpp b/tests/auto/q3dslancelot/baseline/qbaselinetest.cpp index c593727..7b67051 100644 --- a/tests/auto/q3dslancelot/baseline/qbaselinetest.cpp +++ b/tests/auto/q3dslancelot/baseline/qbaselinetest.cpp @@ -71,6 +71,16 @@ void handleCmdLineArgs(int *argcp, char ***argvp) if (arg == "-simfail") { simfail = true; + } else if (arg == "-fuzzlevel") { + i++; + bool ok = false; + (void)nextArg.toInt(&ok); + if (!ok) { + qWarning() << "-fuzzlevel requires integer parameter"; + showHelp = true; + break; + } + customInfo.insert("FuzzLevel", QString::fromLatin1(nextArg)); } else if (arg == "-auto") { customAutoModeSet = true; customInfo.setAdHocRun(false); @@ -106,6 +116,7 @@ void handleCmdLineArgs(int *argcp, char ***argvp) QTextStream out(stdout); out << "\n Baseline testing (lancelot) options:\n"; out << " -simfail : Force an image comparison mismatch. For testing purposes.\n"; + out << " -fuzzlevel <int> : Specify the percentage of fuzziness in comparison. Overrides server default. 0 means exact match.\n"; out << " -auto : Inform server that this run is done by a daemon, CI system or similar.\n"; out << " -adhoc (default) : The inverse of -auto; this run is done by human, e.g. for testing.\n"; out << " -compareto KEY=VAL : Force comparison to baselines from a different client,\n"; |