1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <QtTest/QtTest> |
|
20 |
|
21 #include "ut_lcuiengine.h" |
|
22 #include "testresultxmlparser.h" |
|
23 |
|
24 #if defined(Q_OS_SYMBIAN) |
|
25 #include "ut_lcactivitymanager.h" |
|
26 #endif |
|
27 |
|
28 int main(int argc, char *argv[]) |
|
29 { |
|
30 bool promptOnExit(true); |
|
31 for (int i=0; i<argc; i++) { |
|
32 if (QString(argv[i]) == "-noprompt") |
|
33 promptOnExit = false; |
|
34 } |
|
35 printf("Running tests...\n"); |
|
36 |
|
37 QApplication app(argc, argv); |
|
38 TestResultXmlParser parser; |
|
39 |
|
40 UT_LcUiEngine ut_lcUiEngine; |
|
41 QString resultFileName = "c:/ut_lcui_lcUiEngine.xml"; |
|
42 QStringList args_lcUiEngine( "ut_lcuiengine"); |
|
43 args_lcUiEngine << "-xml" << "-o" << resultFileName; |
|
44 QTest::qExec(&ut_lcUiEngine, args_lcUiEngine); |
|
45 parser.parseAndPrintResults(resultFileName,true); |
|
46 |
|
47 #if defined(Q_OS_SYMBIAN) |
|
48 UT_LcActivityManager ut_lcActivityManager; |
|
49 resultFileName = "c:/ut_lcui_lcActivityManager.xml"; |
|
50 QStringList args_lcActivityManager( "ut_lcuiengine"); |
|
51 args_lcActivityManager << "-xml" << "-o" << resultFileName; |
|
52 QTest::qExec(&ut_lcActivityManager, args_lcActivityManager); |
|
53 parser.parseAndPrintResults(resultFileName,true); |
|
54 #endif |
|
55 |
|
56 if (promptOnExit) { |
|
57 printf("Press any key...\n"); |
|
58 getchar(); |
|
59 } |
|
60 return 0; |
|
61 } |
|
62 |
|
63 |
|
64 |
|
65 |
|