summaryrefslogtreecommitdiffstats
path: root/tests/baselineserver
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2018-04-18 16:24:48 +0200
committerEirik Aavitsland <eirik.aavitsland@qt.io>2018-05-03 06:37:16 +0000
commitb1e0a71997111fc296001bc94e0da8342cf0ac97 (patch)
tree8f916c3083f186aa095215d74f54cc3cbb77ea3c /tests/baselineserver
parentc23e3f48229459ef9d5bcf64a7791a568de5bd2a (diff)
Add option to override comparison fuzziness level to lancelot tests
Sometimes useful to force e.g. an exact match. Change-Id: Ic417a518d91b579c23dea925f747955f11d4143b Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/baselineserver')
-rw-r--r--tests/baselineserver/shared/qbaselinetest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/baselineserver/shared/qbaselinetest.cpp b/tests/baselineserver/shared/qbaselinetest.cpp
index 58c4cae176..11fb208f20 100644
--- a/tests/baselineserver/shared/qbaselinetest.cpp
+++ b/tests/baselineserver/shared/qbaselinetest.cpp
@@ -72,6 +72,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);
@@ -111,6 +121,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 << " -setbaselines : Store ALL rendered images as new baselines. Forces replacement of previous baselines.\n";