logsui/logsengine/tsrc/at_logsengine/src/main.cpp
changeset 0 4a5361db8937
child 21 2f0af9ba7665
equal deleted inserted replaced
-1:000000000000 0:4a5361db8937
       
     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 "at_logsengine.h"
       
    22 #include "testresultxmlparser.h"
       
    23 
       
    24 
       
    25 int main(int argc, char *argv[]) 
       
    26 {
       
    27     bool promptOnExit(true);
       
    28     for (int i=0; i<argc; i++) {
       
    29         if (QString(argv[i]) == "-noprompt")
       
    30             promptOnExit = false;
       
    31     }
       
    32     printf("Running tests...\n");
       
    33     
       
    34     QApplication app(argc, argv);
       
    35     TestResultXmlParser parser;
       
    36     
       
    37     AT_LogsEngine test;
       
    38     QString resultFileName = "c:/at_logs_logsEngine.xml";
       
    39     QStringList args_test( "at_logsEngine");
       
    40     args_test << "-xml" << "-o" << resultFileName;
       
    41     QTest::qExec(&test, args_test);
       
    42     parser.parseAndPrintResults(resultFileName,true); 
       
    43 
       
    44     if (promptOnExit) {
       
    45         printf("Press any key...\n");
       
    46         getchar(); 
       
    47     }
       
    48     return 0;   
       
    49 }
       
    50 
       
    51 
       
    52 
       
    53