summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-02-15 10:53:06 +0100
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-02-15 13:41:03 +0100
commitcae3c016afa72b4d6285d1efefddca4700239eee (patch)
tree35acfccef264e1b9db799111e1851834cbdf10b6 /src/testlib
parent57e94c1b1bf68fde430cecc138f395decf35e917 (diff)
Make it possible to run benchmarks with the "-graphicssystem" switch.
Problem was that the "-graphicssystem" switch were not recognized as a valid benchmark option so the test failed to execute with the following warning: "Unknown option: "-graphicssystem"". We have to pass it through to QApplication, in the same fashion as we do for "-qws". Reviewed-by: jasplin
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtestcase.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index ecdcca8312..a44ae0662d 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -1113,6 +1113,14 @@ static void qParseArgs(int argc, char *argv[])
#endif
} else if (strcmp(argv[i], "-qws") == 0) {
// do nothing
+ } else if (strcmp(argv[i], "-graphicssystem") == 0) {
+ // do nothing
+ if (i + 1 >= argc) {
+ printf("-graphicssystem needs an extra parameter specifying the graphics system\n");
+ exit(1);
+ } else {
+ ++i;
+ }
} else if (argv[i][0] == '-') {
printf("Unknown option: '%s'\n\n%s", argv[i], testOptions);
exit(1);