41
|
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_lcvtindicatorplugin.h"
|
|
22 |
#include "testresultxmlparser.h"
|
|
23 |
|
|
24 |
int main(int argc, char *argv[])
|
|
25 |
{
|
|
26 |
bool promptOnExit(true);
|
|
27 |
for (int i=0; i<argc; i++) {
|
|
28 |
if (QString(argv[i]) == "-noprompt")
|
|
29 |
promptOnExit = false;
|
|
30 |
}
|
|
31 |
printf("Running tests...\n");
|
|
32 |
|
|
33 |
QApplication app(argc, argv);
|
|
34 |
TestResultXmlParser parser;
|
|
35 |
|
|
36 |
UT_LcVtIndicatorPlugin ut_lcvtindicatorplugin;
|
|
37 |
QString resultFileName = "c:/ut_logs_ut_lcvtindicatorplugin.xml";
|
|
38 |
QStringList args_ut_lcvtindicatorplugin( "ut_ut_lcvtindicatorplugin");
|
|
39 |
args_ut_lcvtindicatorplugin << "-xml" << "-o" << resultFileName;
|
|
40 |
QTest::qExec(&ut_lcvtindicatorplugin, args_ut_lcvtindicatorplugin);
|
|
41 |
parser.parseAndPrintResults(resultFileName,true);
|
|
42 |
|
|
43 |
|
|
44 |
if (promptOnExit) {
|
|
45 |
printf("Press any key...\n");
|
|
46 |
getchar();
|
|
47 |
}
|
|
48 |
return 0;
|
|
49 |
}
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|