/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the tools applications of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the either Technology Preview License Agreement or the ** Beta Release License Agreement. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain ** additional rights. These rights are described in the Nokia Qt LGPL ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this ** package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "activesyncconnection.h" #include "deployment.h" #include #include #include #include #include #include #include using namespace std; const int debugLevel = 0; void debugOutput(const QString& text, int level) { if (level <= debugLevel) cout << qPrintable(text) << endl; } // needed for QMake sources to compile QString project_builtin_regx() { return QString();} static QString pwd; QString qmake_getpwd() { if(pwd.isNull()) pwd = QDir::currentPath(); return pwd; } bool qmake_setpwd(const QString &p) { if(QDir::setCurrent(p)) { pwd = QDir::currentPath(); return true; } return false; } namespace TestConfiguration { QString localExecutable; QString localQtConf; QString remoteTestPath; QString remoteLibraryPath; QString remoteExecutable; QString remoteResultFile; bool testDebug; void init() { testDebug = true; localQtConf = QLatin1String("no"); remoteTestPath = QLatin1String("\\Program Files\\qt_test"); remoteLibraryPath = remoteTestPath; remoteResultFile = QLatin1String("\\qt_test_results.txt"); } } void usage() { cout << "QTestLib options\n" " -functions : Returns a list of current testfunctions\n" " -xml : Outputs results as XML document\n" " -lightxml : Outputs results as stream of XML tags\n" " -o filename: Writes all output into a file\n" " -silent : Only outputs warnings and failures\n" " -v1 : Print enter messages for each testfunction\n" " -v2 : Also print out each QVERIFY/QCOMPARE/QTEST\n" " -vs : Print every signal emitted\n" " -eventdelay ms : Set default delay for mouse and keyboard simulation to ms milliseconds\n" " -keydelay ms : Set default delay for keyboard simulation to ms milliseconds\n" " -mousedelay ms : Set default delay for mouse simulation to ms milliseconds\n" " -keyevent-verbose : Turn on verbose messages for keyboard simulation\n" " -maxwarnings n : Sets the maximum amount of messages to output.\n" " 0 means unlimited, default: 2000\n" " -help : This help\n"; cout << "cetest specific options\n" " -debug : Test debug version[default]\n" " -release : Test release version\n" " -libpath : Remote path to deploy Qt libraries to\n" " -qt-delete : Delete the Qt libraries after execution\n" " -project-delete : Delete the project file(s) after execution\n" " -delete : Delete everything deployed after execution\n" " -conf : Specify location of qt.conf file\n" " -f : Specify project file\n" " -cache : Specify .qmake.cache file to use\n" " -timeout : Specify a timeout value after which the test will be terminated\n" " -1 specifies waiting forever (default)\n" " 0 specifies starting the process detached\n" " >0 wait seconds\n" "\n"; } int main(int argc, char **argv) { QStringList arguments; for (int i=0; i