logsui/logsservices/tsrc/at_logsservices/src/main.cpp
changeset 21 2f0af9ba7665
parent 18 acd4e87b24b4
equal deleted inserted replaced
18:acd4e87b24b4 21:2f0af9ba7665
     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_logsservices.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_LogsServices at_services;
       
    38     QString resultFileName = "c:/at_logs_LogsServices.xml";
       
    39     QStringList args( "at_logsservices");
       
    40     args << "-xml" << "-o" << resultFileName;
       
    41     QTest::qExec(&at_services, args);
       
    42     parser.parseAndPrintResults(resultFileName,true); 
       
    43 
       
    44 
       
    45     if (promptOnExit) {
       
    46         printf("Press any key...\n");
       
    47         getchar(); 
       
    48     }
       
    49     return 0;   
       
    50 }
       
    51 
       
    52 
       
    53 
       
    54