summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmake
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-04-17 10:40:52 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-04-17 10:40:52 (GMT)
commitbb2e4df9bee3148e819c98410aa36e22dad95d7a (patch)
treea6e6e8c070a72378d4b2e5f39ad3cc9c368b61ab /tests/auto/qmake
downloadQt-bb2e4df9bee3148e819c98410aa36e22dad95d7a.zip
Qt-bb2e4df9bee3148e819c98410aa36e22dad95d7a.tar.gz
Qt-bb2e4df9bee3148e819c98410aa36e22dad95d7a.tar.bz2
Initial import of kinetic-animations branch from the old kinetic
repository to the new repository
Diffstat (limited to 'tests/auto/qmake')
-rw-r--r--tests/auto/qmake/.gitignore1
-rw-r--r--tests/auto/qmake/qmake.pro9
-rw-r--r--tests/auto/qmake/testcompiler.cpp396
-rw-r--r--tests/auto/qmake/testcompiler.h110
-rw-r--r--tests/auto/qmake/testdata/comments/comments.pro33
-rw-r--r--tests/auto/qmake/testdata/duplicateLibraryEntries/duplib.pro10
-rw-r--r--tests/auto/qmake/testdata/export_across_file_boundaries/.qmake.cache0
-rw-r--r--tests/auto/qmake/testdata/export_across_file_boundaries/features/default_pre.prf7
-rw-r--r--tests/auto/qmake/testdata/export_across_file_boundaries/foo.pro17
-rw-r--r--tests/auto/qmake/testdata/export_across_file_boundaries/oink.pri1
-rw-r--r--tests/auto/qmake/testdata/findDeps/findDeps.pro20
-rw-r--r--tests/auto/qmake/testdata/findDeps/main.cpp61
-rw-r--r--tests/auto/qmake/testdata/findDeps/object1.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object2.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object3.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object4.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object5.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object6.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object7.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object8.h49
-rw-r--r--tests/auto/qmake/testdata/findDeps/object9.h49
-rw-r--r--tests/auto/qmake/testdata/findMocs/findMocs.pro12
-rw-r--r--tests/auto/qmake/testdata/findMocs/main.cpp52
-rw-r--r--tests/auto/qmake/testdata/findMocs/object1.h50
-rw-r--r--tests/auto/qmake/testdata/findMocs/object2.h49
-rw-r--r--tests/auto/qmake/testdata/findMocs/object3.h50
-rw-r--r--tests/auto/qmake/testdata/findMocs/object4.h61
-rw-r--r--tests/auto/qmake/testdata/findMocs/object5.h48
-rw-r--r--tests/auto/qmake/testdata/findMocs/object6.h50
-rw-r--r--tests/auto/qmake/testdata/findMocs/object7.h50
-rw-r--r--tests/auto/qmake/testdata/func_export/func_export.pro22
-rw-r--r--tests/auto/qmake/testdata/func_variables/func_variables.pro52
-rw-r--r--tests/auto/qmake/testdata/functions/1.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/2.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/functions.pro91
-rw-r--r--tests/auto/qmake/testdata/functions/infiletest.pro2
-rw-r--r--tests/auto/qmake/testdata/functions/one/1.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/one/2.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/three/wildcard21.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/three/wildcard22.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/two/1.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/two/2.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/wildcard21.cpp40
-rw-r--r--tests/auto/qmake/testdata/functions/wildcard22.cpp40
-rw-r--r--tests/auto/qmake/testdata/include_dir/foo.pro12
-rw-r--r--tests/auto/qmake/testdata/include_dir/main.cpp51
-rw-r--r--tests/auto/qmake/testdata/include_dir/test_file.cpp48
-rw-r--r--tests/auto/qmake/testdata/include_dir/test_file.h52
-rw-r--r--tests/auto/qmake/testdata/include_dir/untitled.ui22
-rw-r--r--tests/auto/qmake/testdata/include_dir_build/README1
-rw-r--r--tests/auto/qmake/testdata/install_depends/foo.pro23
-rw-r--r--tests/auto/qmake/testdata/install_depends/main.cpp51
-rw-r--r--tests/auto/qmake/testdata/install_depends/test10
-rw-r--r--tests/auto/qmake/testdata/install_depends/test20
-rw-r--r--tests/auto/qmake/testdata/install_depends/test_file.cpp47
-rw-r--r--tests/auto/qmake/testdata/install_depends/test_file.h50
-rw-r--r--tests/auto/qmake/testdata/one_space/main.cpp50
-rw-r--r--tests/auto/qmake/testdata/one_space/one_space.pro10
-rw-r--r--tests/auto/qmake/testdata/operators/operators.pro24
-rw-r--r--tests/auto/qmake/testdata/prompt/prompt.pro2
-rw-r--r--tests/auto/qmake/testdata/quotedfilenames/main.cpp51
-rw-r--r--tests/auto/qmake/testdata/quotedfilenames/quotedfilenames.pro22
-rw-r--r--tests/auto/qmake/testdata/quotedfilenames/rc folder/logo.pngbin0 -> 16715 bytes
-rw-r--r--tests/auto/qmake/testdata/quotedfilenames/rc folder/test.qrc5
-rw-r--r--tests/auto/qmake/testdata/shadow_files/foo.pro17
-rw-r--r--tests/auto/qmake/testdata/shadow_files/main.cpp51
-rw-r--r--tests/auto/qmake/testdata/shadow_files/test.txt0
-rw-r--r--tests/auto/qmake/testdata/shadow_files/test_file.cpp47
-rw-r--r--tests/auto/qmake/testdata/shadow_files/test_file.h50
-rw-r--r--tests/auto/qmake/testdata/shadow_files_build/README1
-rw-r--r--tests/auto/qmake/testdata/shadow_files_build/foo.bar0
-rw-r--r--tests/auto/qmake/testdata/simple_app/main.cpp52
-rw-r--r--tests/auto/qmake/testdata/simple_app/simple_app.pro12
-rw-r--r--tests/auto/qmake/testdata/simple_app/test_file.cpp47
-rw-r--r--tests/auto/qmake/testdata/simple_app/test_file.h50
-rw-r--r--tests/auto/qmake/testdata/simple_dll/simple.cpp56
-rw-r--r--tests/auto/qmake/testdata/simple_dll/simple.h59
-rw-r--r--tests/auto/qmake/testdata/simple_dll/simple_dll.pro19
-rw-r--r--tests/auto/qmake/testdata/simple_lib/simple.cpp56
-rw-r--r--tests/auto/qmake/testdata/simple_lib/simple.h58
-rw-r--r--tests/auto/qmake/testdata/simple_lib/simple_lib.pro14
-rw-r--r--tests/auto/qmake/testdata/subdirs/simple_app/main.cpp52
-rw-r--r--tests/auto/qmake/testdata/subdirs/simple_app/simple_app.pro12
-rw-r--r--tests/auto/qmake/testdata/subdirs/simple_app/test_file.cpp47
-rw-r--r--tests/auto/qmake/testdata/subdirs/simple_app/test_file.h50
-rw-r--r--tests/auto/qmake/testdata/subdirs/simple_dll/simple.cpp56
-rw-r--r--tests/auto/qmake/testdata/subdirs/simple_dll/simple.h59
-rw-r--r--tests/auto/qmake/testdata/subdirs/simple_dll/simple_dll.pro20
-rw-r--r--tests/auto/qmake/testdata/subdirs/subdirs.pro6
-rw-r--r--tests/auto/qmake/testdata/variables/variables.pro14
-rw-r--r--tests/auto/qmake/tst_qmake.cpp385
91 files changed, 3906 insertions, 0 deletions
diff --git a/tests/auto/qmake/.gitignore b/tests/auto/qmake/.gitignore
new file mode 100644
index 0000000..bac457d
--- /dev/null
+++ b/tests/auto/qmake/.gitignore
@@ -0,0 +1 @@
+tst_qmake
diff --git a/tests/auto/qmake/qmake.pro b/tests/auto/qmake/qmake.pro
new file mode 100644
index 0000000..59cc2be
--- /dev/null
+++ b/tests/auto/qmake/qmake.pro
@@ -0,0 +1,9 @@
+load(qttest_p4)
+HEADERS += testcompiler.h
+SOURCES += tst_qmake.cpp testcompiler.cpp
+
+contains(QT_CONFIG, qt3support): QT += qt3support
+
+cross_compile: DEFINES += QMAKE_CROSS_COMPILED
+
+
diff --git a/tests/auto/qmake/testcompiler.cpp b/tests/auto/qmake/testcompiler.cpp
new file mode 100644
index 0000000..b1f9955
--- /dev/null
+++ b/tests/auto/qmake/testcompiler.cpp
@@ -0,0 +1,396 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "testcompiler.h"
+#include <stdlib.h>
+#include <qapplication.h>
+
+#ifdef QT3_SUPPORT
+
+#include <q3process.h>
+#include <qtimer.h>
+#ifdef Q_OS_WIN32
+# include <windows.h>
+#endif
+
+#include <QtTest/QtTest>
+
+#undef SHOW_QDEBUG
+#undef SHOW_COMPLETENESS
+
+QString targetName( BuildType buildMode, const QString& target, const QString& version )
+{
+ QString targetName = target;
+
+#if defined (Q_OS_WIN32)
+ switch (buildMode)
+ {
+ case Exe: // app
+ targetName.append(".exe");
+ break;
+ case Dll: // dll
+ if (version != "") {
+ QStringList ver = QStringList::split(".", version);
+ targetName.append(ver.first());
+ }
+ targetName.append(".dll");
+ break;
+ case Lib: // lib
+#ifdef Q_CC_GNU
+ targetName.prepend("lib");
+ targetName.append(".a");
+#else
+ targetName.append(".lib");
+#endif
+ break;
+ case Plain:
+ // no conversion
+ break;
+ }
+#elif defined( Q_OS_MAC )
+ switch (buildMode)
+ {
+ case Exe: // app
+ targetName += ".app/Contents/MacOS/" + target.section('/', -1);
+ break;
+ case Dll: // dll
+ targetName.prepend("lib");
+ targetName.append("." + version + ".dylib");
+ break;
+ case Lib: // lib
+ targetName.prepend("lib");
+ targetName.append(".a");
+ break;
+ case Plain:
+ // no conversion
+ break;
+ }
+#else
+ switch (buildMode)
+ {
+ case Exe: // app
+ break;
+ case Dll: // dll
+ targetName.prepend("lib");
+#if defined (Q_OS_HPUX) && !defined (__ia64)
+ targetName.append(".sl");
+#elif defined (Q_OS_AIX)
+ targetName.append(".a");
+#else
+ targetName.append(".so");
+#endif
+ break;
+ case Lib: // lib
+ targetName.prepend("lib");
+ targetName.append(".a");
+ break;
+ case Plain:
+ // no conversion
+ break;
+ }
+#endif
+ return targetName;
+}
+
+
+
+TestCompiler::TestCompiler()
+{
+ exit_ok = FALSE;
+ childProc = 0;
+ setBaseCommands( "", "", FALSE );
+}
+
+TestCompiler::~TestCompiler()
+{
+ if (childProc)
+ delete childProc;
+}
+
+bool TestCompiler::runChild( bool showOutput, QStringList argList, QStringList *envList )
+{
+ //qDebug() << "executing" << argList;
+ exit_ok = FALSE;
+ if (childProc)
+ delete childProc;
+
+ child_show = showOutput;
+ if ( showOutput ) {
+
+ QString S = argList.join(" ");
+ addMakeResult( S );
+ }
+
+ childProc = new Q3Process(argList, this, argList.join(" ").latin1());
+ Q_ASSERT(childProc);
+
+ connect(childProc,SIGNAL(readyReadStdout()),this,SLOT(childHasData()));
+ connect(childProc,SIGNAL(processExited()),this,SLOT(childReady()));
+
+ if (!childProc->start( envList )) {
+
+ addMakeResult( "Error executing '" + argList[0] + "'." );
+ childReady();
+ return FALSE;
+ }
+
+ while (childProc != 0 && childProc->isRunning()) {
+ qApp->processEvents();
+ }
+
+ childReady();
+
+ return exit_ok;
+}
+
+void TestCompiler::childReady()
+{
+ if (childProc != 0) {
+ childHasData();
+
+ QString S;
+ int pos;
+ while (childProc->canReadLineStderr()) {
+ S = childProc->readLineStderr();
+ do {
+ pos = S.find("\t");
+ if (pos >= 0) {
+ S.remove(pos,1);
+ S.insert(pos," ");
+ }
+ } while (pos >= 0);
+
+ if (child_show)
+ addMakeResult( S );
+ }
+
+ exit_ok = childProc->normalExit() && childProc->exitStatus() == 0;
+ delete childProc;
+ }
+ childProc = 0;
+}
+
+void TestCompiler::childHasData()
+{
+ QString S;
+ int pos;
+ while (childProc->canReadLineStderr()) {
+
+ S = childProc->readLineStderr();
+ do {
+ pos = S.find("\t");
+ if (pos >= 0) {
+ S.remove(pos,1);
+ S.insert(pos," ");
+ }
+
+ } while (pos >= 0);
+
+ if ( S.startsWith("Project MESSAGE: FAILED") )
+ QTest::qFail( S, __FILE__, __LINE__ );
+ else if ( S.startsWith("Project MESSAGE: SKIPPED") )
+ QTest::qSkip( S, QTest::SkipSingle, __FILE__, __LINE__ );
+ else if (child_show)
+ addMakeResult( S );
+ }
+}
+
+void TestCompiler::setBaseCommands( QString makeCmd, QString qmakeCmd, bool qwsMode )
+{
+ qws_mode = qwsMode;
+ make_cmd = makeCmd;
+
+ // not sure if i need this, but it doesn't hurt
+ if (make_cmd.startsWith("\""))
+ make_cmd = make_cmd.remove(0,1);
+ if (make_cmd.endsWith("\""))
+ make_cmd = make_cmd.remove(make_cmd.length()-1,1);
+
+ qmake_cmd = qmakeCmd;
+ // also not sure if i need this, but it doesn't hurt...
+ if(qmake_cmd.length() >= 2 && (qmake_cmd.at(0) == '"' || qmake_cmd.at(0) == '\'') && qmake_cmd.at(qmake_cmd.length()-1) == qmake_cmd.at(0))
+ qmake_cmd = qmake_cmd.mid(1, qmake_cmd.length()-2);
+}
+
+bool TestCompiler::cleanAll( const QString &workPath, const QString &destPath, const QString &exeName, const QString &exeExt )
+{
+ QDir D(workPath);
+ if (!D.exists()) {
+
+ addMakeResult( "Directory '" + workPath + "' doesn't exist" );
+ return FALSE;
+ }
+
+ D.setCurrent(workPath);
+ // must delete at least the executable file to be able to easily and safely
+ // verify that the compilation was a success.
+ D.remove( destPath + "/" + exeName + exeExt );
+ D.remove( workPath + "/Makefile");
+ QFileInfo Fi( workPath + "/Makefile");
+ if (Fi.exists()) {
+
+ // Run make clean
+ QStringList args;
+ args = QStringList::split( " ", make_cmd );
+ args.append("clean");
+
+ return runChild( FALSE, args, 0 );
+ }
+
+ return TRUE;
+}
+
+bool TestCompiler::makeClean( const QString &workPath )
+{
+ QDir D;
+ if (!D.exists(workPath)) {
+
+ addMakeResult( "Directory '" + workPath + "' doesn't exist" );
+ return FALSE;
+ }
+
+ D.setCurrent(workPath);
+ QFileInfo Fi( workPath + "/Makefile");
+ if (Fi.exists()) {
+
+ // Run make clean
+ QStringList args;
+ args = QStringList::split( " ", make_cmd );
+ args.append("clean");
+
+ return runChild( FALSE, args, 0 );
+ }
+
+ return TRUE;
+}
+
+bool TestCompiler::makeDistClean( const QString &workPath )
+{
+ QDir D;
+ if (!D.exists(workPath)) {
+ addMakeResult( "Directory '" + workPath + "' doesn't exist" );
+ return FALSE;
+ }
+
+ D.setCurrent(workPath);
+ QFileInfo Fi( workPath + "/Makefile");
+ if (Fi.exists()) {
+ // Run make distclean
+ QStringList args;
+ args = QStringList::split( " ", make_cmd );
+ args.append("distclean");
+
+ return runChild( FALSE, args, 0 );
+ }
+
+ return TRUE;
+
+}
+
+bool TestCompiler::qmake( const QString &workDir, const QString &proName, const QString &buildDir )
+{
+ // Now start qmake and generate the makefile
+
+ QDir D( workDir );
+ // Make sure we start in the right directory
+ D.setCurrent( workDir );
+
+ if (D.exists("Makefile"))
+ D.remove("Makefile");
+
+ QStringList args;
+ args = QStringList::split( " ", qmake_cmd );
+
+ QString project_fname = workDir + "/" + proName + ".pro";
+ QString makefile_fname = (buildDir.isNull()?QString():(buildDir + "/")) + "Makefile";
+
+ args.append( project_fname );
+ args.append( "-o" );
+ args.append( makefile_fname );
+
+ return runChild( TRUE, args, 0 );
+}
+
+bool TestCompiler::make( const QString &workPath, const QString &target )
+{
+ QDir D;
+ D.setCurrent( workPath );
+
+ QStringList args;
+ args = QStringList::split( " ", make_cmd );
+ if ( make_cmd.lower().find("nmake") >= 0)
+ args.append("/NOLOGO");
+ if ( !target.isNull() )
+ args.append(target);
+
+ bool ok = runChild( TRUE, args, 0 );
+
+ if (!ok) {
+ QTest::qFail( COMPILE_ERROR, __FILE__, __LINE__ );
+ }
+
+ return ok;
+}
+
+bool TestCompiler::exists( const QString &destDir, const QString &exeName, BuildType buildType, const QString &version )
+{
+ QFileInfo f(destDir + "/" + targetName(buildType, exeName, version));
+ return f.exists();
+}
+
+void TestCompiler::addMakeResult( const QString &result )
+{
+ make_result.append( result );
+}
+
+bool TestCompiler::removeMakefile( const QString &workPath )
+{
+ QDir D;
+ D.setCurrent( workPath );
+ if ( D.exists( "Makefile" ) )
+ return D.remove( "Makefile" );
+ else
+ return TRUE;
+}
+
+#endif //QT3_SUPPORT
+
diff --git a/tests/auto/qmake/testcompiler.h b/tests/auto/qmake/testcompiler.h
new file mode 100644
index 0000000..597d440
--- /dev/null
+++ b/tests/auto/qmake/testcompiler.h
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef TESTCOMPILER_H
+#define TESTCOMPILER_H
+
+
+#ifdef QT3_SUPPORT
+
+#include <qobject.h>
+#include <qstringlist.h>
+
+QT_FORWARD_DECLARE_CLASS(Q3Process)
+
+#define COMPILE_ERROR "Compile error"
+#define COMPILE_SUCCESS "Compile successfull"
+#define COMPILE_NOT_AVAIL "Binary not available for testing"
+#define SELF_TEST "self-test"
+
+enum BuildType { Exe, Dll, Lib, Plain };
+
+class TestCompiler : public QObject
+{
+Q_OBJECT
+
+public:
+ TestCompiler();
+ virtual ~TestCompiler();
+
+ void setBaseCommands( QString makeCmd, QString qmakeCmd, bool qwsMode );
+
+ // builds a complete project, e.g. qmake, make clean, make and exists.
+ bool buildProject( const QString &project, BuildType buildType, const QString &targetName, const QString &destPath, const QString &version );
+
+ // executes a make clean in the specified workPath
+ bool makeClean( const QString &workPath );
+ // executes a make dist clean in the specified workPath
+ bool makeDistClean( const QString &workPath );
+ // executes a qmake on proName in the specified workDir, output goes to buildDir or workDir if it's null
+ bool qmake( const QString &workDir, const QString &proName, const QString &buildDir = QString() );
+ // executes a make in the specified workPath, with an optional target (eg. install)
+ bool make( const QString &workPath, const QString &target = QString() );
+ // executes a make clean and then deletes the makefile in workpath + deletes the executable
+ // in destPath.
+ bool cleanAll( const QString &workPath, const QString &destPath, const QString &exeName, const QString &exeExt );
+ // checks if the executable exists in destDir
+ bool exists( const QString &destDir, const QString &exeName, BuildType buildType, const QString &version );
+ // removes the makefile
+ bool removeMakefile( const QString &workPath );
+
+private:
+ QString make_cmd;
+ QString qmake_cmd;
+
+ Q3Process *childProc;
+ QStringList env_list;
+
+ bool child_show;
+ bool qws_mode;
+ bool exit_ok;
+
+private:
+ bool runChild( bool showOutput, QStringList argList, QStringList *envList );
+ void addMakeResult( const QString &result );
+ QStringList make_result;
+
+private slots:
+ void childReady();
+ void childHasData();
+};
+
+#endif // QT3_SUPPORT
+#endif // TESTCOMPILER_H
diff --git a/tests/auto/qmake/testdata/comments/comments.pro b/tests/auto/qmake/testdata/comments/comments.pro
new file mode 100644
index 0000000..5f1ac08
--- /dev/null
+++ b/tests/auto/qmake/testdata/comments/comments.pro
@@ -0,0 +1,33 @@
+LIST = 1 2 3 4 #a comment
+!equals( LIST, 1 2 3 4 ) {
+ message( "FAILED: inline comment" )
+}
+
+LIST = 1 \
+ 2 \
+# 3 \
+ 4
+!equals( LIST, 1 2 4 ) {
+ message( "FAILED: commented out continuation" )
+}
+
+LIST = 1 \
+ 2 \#comment
+ 3 \
+ 4
+!equals( LIST, 1 2 3 4 ) {
+ message( "FAILED: comment at end of continuation")
+}
+
+
+LIST = 1 2 3 4#comment
+!equals( LIST, 1 2 3 4 ) {
+ message( "FAILED: no space before comment" )
+}
+
+LIST = 1 2 3 4$${LITERAL_HASH}five
+!equals( LIST, 1 2 3 4$${LITERAL_HASH}five ) {
+ message( "FAILED: using LITERAL_HASH" )
+}
+
+
diff --git a/tests/auto/qmake/testdata/duplicateLibraryEntries/duplib.pro b/tests/auto/qmake/testdata/duplicateLibraryEntries/duplib.pro
new file mode 100644
index 0000000..3c30bbb
--- /dev/null
+++ b/tests/auto/qmake/testdata/duplicateLibraryEntries/duplib.pro
@@ -0,0 +1,10 @@
+LIBS = -lqui -lqtest -lqui
+CONFIG -= link_prl
+JOINEDLIBS = $$join(LIBS, "_")
+
+!contains(JOINEDLIBS, -lqui_-lqtest_-lqui) {
+ message("FAILED: duplibs")
+}
+
+
+
diff --git a/tests/auto/qmake/testdata/export_across_file_boundaries/.qmake.cache b/tests/auto/qmake/testdata/export_across_file_boundaries/.qmake.cache
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/qmake/testdata/export_across_file_boundaries/.qmake.cache
diff --git a/tests/auto/qmake/testdata/export_across_file_boundaries/features/default_pre.prf b/tests/auto/qmake/testdata/export_across_file_boundaries/features/default_pre.prf
new file mode 100644
index 0000000..123f9bc
--- /dev/null
+++ b/tests/auto/qmake/testdata/export_across_file_boundaries/features/default_pre.prf
@@ -0,0 +1,7 @@
+defineTest(setVar) {
+ eval($${1}=bar)
+ export($$1)
+}
+
+setVar(FOO)
+
diff --git a/tests/auto/qmake/testdata/export_across_file_boundaries/foo.pro b/tests/auto/qmake/testdata/export_across_file_boundaries/foo.pro
new file mode 100644
index 0000000..c3196cb
--- /dev/null
+++ b/tests/auto/qmake/testdata/export_across_file_boundaries/foo.pro
@@ -0,0 +1,17 @@
+!equals(FOO,bar) {
+ message( "FAILED: export() invisible from default_pre.prf to foo.pro" )
+}
+
+O_FOO=$$fromfile(oink.pri,FOO)
+O_BAR=$$fromfile(oink.pri,BAR)
+
+!equals(O_BAR,bar) {
+ message( "FAILED: export() invisible from oink.pri through \$$fromfile()" )
+}
+
+!equals(O_FOO,bar) {
+ message( "FAILED: export() invisible from default_pre.prf through \$$fromfile()" )
+}
+
+
+
diff --git a/tests/auto/qmake/testdata/export_across_file_boundaries/oink.pri b/tests/auto/qmake/testdata/export_across_file_boundaries/oink.pri
new file mode 100644
index 0000000..cbd2d0f
--- /dev/null
+++ b/tests/auto/qmake/testdata/export_across_file_boundaries/oink.pri
@@ -0,0 +1 @@
+setVar(BAR)
diff --git a/tests/auto/qmake/testdata/findDeps/findDeps.pro b/tests/auto/qmake/testdata/findDeps/findDeps.pro
new file mode 100644
index 0000000..e0a2b86
--- /dev/null
+++ b/tests/auto/qmake/testdata/findDeps/findDeps.pro
@@ -0,0 +1,20 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Thu Mar 12 11:08:20 2009
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+HEADERS += object1.h \
+ object2.h \
+ object3.h \
+ object4.h \
+ object5.h \
+ object6.h \
+ object7.h \
+ object8.h \
+ object9.h
+SOURCES += main.cpp
diff --git a/tests/auto/qmake/testdata/findDeps/main.cpp b/tests/auto/qmake/testdata/findDeps/main.cpp
new file mode 100644
index 0000000..9fd9ea0
--- /dev/null
+++ b/tests/auto/qmake/testdata/findDeps/main.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+ #include <moc_object1.cpp>
+/**/ #include <moc_object2.cpp>
+/**//**/ #include <moc_object3.cpp>
+/*'*/ #include <moc_object4.cpp>
+/*
+*/ #include <moc_object5.cpp>
+
+//
+#include <moc_object6.cpp>
+
+static void function1();
+#include <moc_object7.cpp>
+static void function2(); /**/
+#include <moc_object8.cpp>
+static void function3(); //
+#include <moc_object9.cpp>
+
+int main () {}
+
diff --git a/tests/auto/qmake/testdata/findDeps/object1.h b/tests/auto/qmake/testdata/findDeps/object1.h
new file mode 100644
index 0000000..403e510
--- /dev/null
+++ b/tests/auto/qmake/testdata/findDeps/object1.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QObject>
+
+class Object1 : public QObject
+{
+ Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findDeps/object2.h b/tests/auto/qmake/testdata/findDeps/object2.h
new file mode 100644
index 0000000..2f790e7
--- /dev/null
+++ b/tests/auto/qmake/testdata/findDeps/object2.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QObject>
+
+class Object2 : public QObject
+{
+ Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findDeps/object3.h b/tests/auto/qmake/testdata/findDeps/object3.h
new file mode 100644
index 0000000..3aad6f6
--- /dev/null
+++ b/tests/auto/qmake/testdata/findDeps/object3.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QObject>
+
+class Object3 : public QObject
+{
+ Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findDeps/object4.h b/tests/auto/qmake/testdata/findDeps/object4.h
new file mode 100644
index 0000000..92c7ac0
--- /dev/null
+++ b/tests/auto/qmake/testdata/findDeps/object4.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QObject>
+
+class Object4 : public QObject
+{
+ Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findDeps/object5.h b/tests/auto/qmake/testdata/findDeps/object5.h
new file mode 100644
index 0000000..0bee050
--- /dev/null
+++ b/tests/auto/qmake/testdata/findDeps/object5.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QObject>
+
+class Object5 : public QObject
+{
+ Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findDeps/object6.h b/tests/auto/qmake/testdata/findDeps/object6.h
new file mode 100644
index 0000000..55f39ca
--- /dev/null
+++ b/tests/auto/qmake/testdata/findDeps/object6.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QObject>
+
+class Object6 : public QObject
+{
+ Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findDeps/object7.h b/tests/auto/qmake/testdata/findDeps/object7.h
new file mode 100644
index 0000000..99c5ae3
--- /dev/null
+++ b/tests/auto/qmake/testdata/findDeps/object7.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QObject>
+
+class Object7 : public QObject
+{
+ Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findDeps/object8.h b/tests/auto/qmake/testdata/findDeps/object8.h
new file mode 100644
index 0000000..6ae3c08
--- /dev/null
+++ b/tests/auto/qmake/testdata/findDeps/object8.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QObject>
+
+class Object8 : public QObject
+{
+ Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findDeps/object9.h b/tests/auto/qmake/testdata/findDeps/object9.h
new file mode 100644
index 0000000..4cbcf13
--- /dev/null
+++ b/tests/auto/qmake/testdata/findDeps/object9.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QObject>
+
+class Object9 : public QObject
+{
+ Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findMocs/findMocs.pro b/tests/auto/qmake/testdata/findMocs/findMocs.pro
new file mode 100644
index 0000000..daa3c7f
--- /dev/null
+++ b/tests/auto/qmake/testdata/findMocs/findMocs.pro
@@ -0,0 +1,12 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Wed Mar 11 16:11:09 2009
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+HEADERS += object1.h object2.h object3.h object4.h object5.h object6.h object7.h
+SOURCES += main.cpp
diff --git a/tests/auto/qmake/testdata/findMocs/main.cpp b/tests/auto/qmake/testdata/findMocs/main.cpp
new file mode 100644
index 0000000..8530b1b
--- /dev/null
+++ b/tests/auto/qmake/testdata/findMocs/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <moc_object1.cpp>
+#include <moc_object2.cpp>
+#include <moc_object3.cpp>
+#include "object4.h"
+#include <moc_object5.cpp>
+#include <moc_object6.cpp>
+#include <moc_object7.cpp>
+
+int main () {}
+
diff --git a/tests/auto/qmake/testdata/findMocs/object1.h b/tests/auto/qmake/testdata/findMocs/object1.h
new file mode 100644
index 0000000..55675d6
--- /dev/null
+++ b/tests/auto/qmake/testdata/findMocs/object1.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+/**//*'*/
+#include <QObject>
+
+class Object1 : public QObject
+{
+ Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findMocs/object2.h b/tests/auto/qmake/testdata/findMocs/object2.h
new file mode 100644
index 0000000..bd38f7d
--- /dev/null
+++ b/tests/auto/qmake/testdata/findMocs/object2.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/**//*"*/
+#include <QObject>
+
+class Object2 : public QObject
+{
+ Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findMocs/object3.h b/tests/auto/qmake/testdata/findMocs/object3.h
new file mode 100644
index 0000000..b543b26
--- /dev/null
+++ b/tests/auto/qmake/testdata/findMocs/object3.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+*/
+#include <QObject>
+
+class Object3 : public QObject
+{
+ Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findMocs/object4.h b/tests/auto/qmake/testdata/findMocs/object4.h
new file mode 100644
index 0000000..d06d629
--- /dev/null
+++ b/tests/auto/qmake/testdata/findMocs/object4.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QObject>
+
+/*/ <-- Inside a comment
+
+class Object4 : public QObject
+{
+ Q_OBJECT
+};
+
+Comment ends there --> /*/
+
+// Now we poison moc, just to make sure this doesn't get moc'ed :)
+class NonMocObject
+/* : QObject */
+{
+ /* qmake ignore Q_OBJECT */
+ Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findMocs/object5.h b/tests/auto/qmake/testdata/findMocs/object5.h
new file mode 100644
index 0000000..39191c4
--- /dev/null
+++ b/tests/auto/qmake/testdata/findMocs/object5.h
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QObject>
+
+class Object5 : public QObject
+{
+/**/Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findMocs/object6.h b/tests/auto/qmake/testdata/findMocs/object6.h
new file mode 100644
index 0000000..10f1686
--- /dev/null
+++ b/tests/auto/qmake/testdata/findMocs/object6.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/**//*'*/
+#include <QObject>
+
+class Object6 : public QObject
+{
+/**//*
+ */Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/findMocs/object7.h b/tests/auto/qmake/testdata/findMocs/object7.h
new file mode 100644
index 0000000..a7b23ff
--- /dev/null
+++ b/tests/auto/qmake/testdata/findMocs/object7.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/**//*'*/
+#include <QObject>
+
+class Object7 : public QObject
+{
+//
+Q_OBJECT
+};
+
diff --git a/tests/auto/qmake/testdata/func_export/func_export.pro b/tests/auto/qmake/testdata/func_export/func_export.pro
new file mode 100644
index 0000000..0cff1f8
--- /dev/null
+++ b/tests/auto/qmake/testdata/func_export/func_export.pro
@@ -0,0 +1,22 @@
+defineTest(doExport) {
+ EXPORTED += $$1
+ export(EXPORTED)
+}
+
+defineTest(callDoExport) {
+ doExport(bar)
+ doExport(baz)
+ EXPORTED = oink
+ !isEqual(EXPORTED, "oink") {
+ message( "FAILED: function-scope exports [$$EXPORTED] != oink" )
+ }
+}
+
+doExport(foo)
+callDoExport()
+!isEqual(EXPORTED, "foo bar baz") {
+ message( "FAILED: global-scope exports [$$EXPORTED] != foo bar baz" )
+}
+
+
+
diff --git a/tests/auto/qmake/testdata/func_variables/func_variables.pro b/tests/auto/qmake/testdata/func_variables/func_variables.pro
new file mode 100644
index 0000000..9b786f7
--- /dev/null
+++ b/tests/auto/qmake/testdata/func_variables/func_variables.pro
@@ -0,0 +1,52 @@
+defineTest(testVariable) {
+ varname=$$1
+ value=$$eval($$varname)
+ RESULT=$$value
+ export(RESULT)
+}
+
+defineTest(callTest) {
+ myvar=$$1
+ testVariable(myvar)
+}
+
+defineTest(callTestExport) {
+ myvar=$$1
+ export(myvar)
+ testVariable(myvar)
+}
+
+defineTest(callTestExportChange) {
+ myvar=foo
+ export(myvar)
+ myvar=$$1
+ testVariable(myvar)
+}
+
+value=direct
+myvar=$$value
+testVariable(myvar)
+!isEqual(RESULT,$$value) {
+ message( "FAILED: result [$$RESULT] != $$value" )
+}
+
+value=export
+callTestExport($$value)
+!isEqual(RESULT,$$value) {
+ message( "FAILED: result [$$RESULT] != $$value" )
+}
+
+value=export_and_change
+callTestExportChange($$value)
+!isEqual(RESULT,$$value) {
+ message( "FAILED: result [$$RESULT] != $$value" )
+}
+
+value=local
+callTest($$value)
+!isEqual(RESULT,$$value) {
+ message( "FAILED: result [$$RESULT] != $$value" )
+}
+
+
+
diff --git a/tests/auto/qmake/testdata/functions/1.cpp b/tests/auto/qmake/testdata/functions/1.cpp
new file mode 100644
index 0000000..edd459d
--- /dev/null
+++ b/tests/auto/qmake/testdata/functions/1.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/tests/auto/qmake/testdata/functions/2.cpp b/tests/auto/qmake/testdata/functions/2.cpp
new file mode 100644
index 0000000..edd459d
--- /dev/null
+++ b/tests/auto/qmake/testdata/functions/2.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/tests/auto/qmake/testdata/functions/functions.pro b/tests/auto/qmake/testdata/functions/functions.pro
new file mode 100644
index 0000000..5ee5f51
--- /dev/null
+++ b/tests/auto/qmake/testdata/functions/functions.pro
@@ -0,0 +1,91 @@
+CONFIG = qt thread
+
+#count
+!count( CONFIG, 2 ) {
+ message( "FAILED: count function: $$CONFIG" )
+}
+
+#contains
+!contains( CONFIG, thread ) {
+ message( "FAILED: contains function: $$CONFIG" )
+}
+
+#exists
+!exists( functions.pro ) {
+ message( "FAILED: exists function" )
+}
+
+#isEmpty
+isEmpty( CONFIG ) {
+ message( "FAILED: isEmpty function: $CONFIG" )
+}
+
+#files
+!equals($$list($$files(one/*.cpp)), "one/1.cpp one/2.cpp") {
+ message( "FAILED: files function: one/*.cpp" )
+}
+!equals($$list($$files(one/1*.cpp)), "one/1.cpp") {
+ message( "FAILED: files function: one/1*.cpp" )
+}
+!equals($$list($$files(two/*.cpp)), "two/1.cpp two/2.cpp") {
+ message( "FAILED: files function: two/*.cpp" )
+}
+!equals($$list($$files(three/wildcard*.cpp)), "three/wildcard21.cpp three/wildcard22.cpp") {
+ message( "FAILED: files function: three/wildcard*.cpp" )
+}
+!equals($$list($$files(*.cpp)), "1.cpp 2.cpp wildcard21.cpp wildcard22.cpp") {
+ message( "FAILED: files function: *.cpp" )
+}
+!equals($$list($$files(wildcard*.cpp)), "wildcard21.cpp wildcard22.cpp") {
+ message( "FAILED: files function: wildcard*.cpp" )
+}
+
+#infile
+!infile( infiletest.pro, DEFINES, QT_DLL ){
+ message( "FAILED: infile function" )
+}
+
+#include
+include( infiletest.pro )
+!contains( DEFINES, QT_DLL ) {
+ message( "FAILED: include function: $$DEFINES" )
+}
+
+lessThan(QT_VERSION, 40200) {
+ message( "SKIPPED: replace function only in 4.2" )
+} else {
+ #replace
+ VERSION=1.0.0
+ VERSION_replaced=$$replace(VERSION,\.,_)
+ !isEqual(VERSION_replaced, 1_0_0) {
+ message( "FAILED: replace function: $$VERSION_replaced" )
+ }
+}
+
+#test functions
+defineTest(myTestFunction) {
+ RESULT =
+ list=$$1
+ for(l, list) {
+ RESULT += $$l
+ }
+ export(RESULT)
+}
+myTestFunction(oink baa moo)
+!equals($$list($$member(RESULT, 0)), "oink") {
+ message("FAILED: myTestFunction: $$RESULT")
+}
+myTestFunction("oink baa" moo)
+!equals($$list($$member(RESULT, 0)), "oink baa") {
+ message("FAILED: myTestFunction: $$RESULT")
+}
+myTestFunction(oink "baa moo")
+!equals($$list($$member(RESULT, 0)), "oink") {
+ message("FAILED: myTestFunction: $$RESULT")
+}
+myTestFunction("oink baa moo")
+!equals($$list($$member(RESULT, 0)), "oink baa moo") {
+ message("FAILED: myTestFunction: $$RESULT")
+}
+
+
diff --git a/tests/auto/qmake/testdata/functions/infiletest.pro b/tests/auto/qmake/testdata/functions/infiletest.pro
new file mode 100644
index 0000000..b2492e1
--- /dev/null
+++ b/tests/auto/qmake/testdata/functions/infiletest.pro
@@ -0,0 +1,2 @@
+DEFINES = QT_DLL
+
diff --git a/tests/auto/qmake/testdata/functions/one/1.cpp b/tests/auto/qmake/testdata/functions/one/1.cpp
new file mode 100644
index 0000000..edd459d
--- /dev/null
+++ b/tests/auto/qmake/testdata/functions/one/1.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/tests/auto/qmake/testdata/functions/one/2.cpp b/tests/auto/qmake/testdata/functions/one/2.cpp
new file mode 100644
index 0000000..edd459d
--- /dev/null
+++ b/tests/auto/qmake/testdata/functions/one/2.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/tests/auto/qmake/testdata/functions/three/wildcard21.cpp b/tests/auto/qmake/testdata/functions/three/wildcard21.cpp
new file mode 100644
index 0000000..edd459d
--- /dev/null
+++ b/tests/auto/qmake/testdata/functions/three/wildcard21.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/tests/auto/qmake/testdata/functions/three/wildcard22.cpp b/tests/auto/qmake/testdata/functions/three/wildcard22.cpp
new file mode 100644
index 0000000..edd459d
--- /dev/null
+++ b/tests/auto/qmake/testdata/functions/three/wildcard22.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/tests/auto/qmake/testdata/functions/two/1.cpp b/tests/auto/qmake/testdata/functions/two/1.cpp
new file mode 100644
index 0000000..edd459d
--- /dev/null
+++ b/tests/auto/qmake/testdata/functions/two/1.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/tests/auto/qmake/testdata/functions/two/2.cpp b/tests/auto/qmake/testdata/functions/two/2.cpp
new file mode 100644
index 0000000..edd459d
--- /dev/null
+++ b/tests/auto/qmake/testdata/functions/two/2.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/tests/auto/qmake/testdata/functions/wildcard21.cpp b/tests/auto/qmake/testdata/functions/wildcard21.cpp
new file mode 100644
index 0000000..edd459d
--- /dev/null
+++ b/tests/auto/qmake/testdata/functions/wildcard21.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/tests/auto/qmake/testdata/functions/wildcard22.cpp b/tests/auto/qmake/testdata/functions/wildcard22.cpp
new file mode 100644
index 0000000..edd459d
--- /dev/null
+++ b/tests/auto/qmake/testdata/functions/wildcard22.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/tests/auto/qmake/testdata/include_dir/foo.pro b/tests/auto/qmake/testdata/include_dir/foo.pro
new file mode 100644
index 0000000..ff4a5cd
--- /dev/null
+++ b/tests/auto/qmake/testdata/include_dir/foo.pro
@@ -0,0 +1,12 @@
+UI_DIR =
+MOC_DIR=
+TEMPLATE=app
+TARGET=foo
+FORMS=untitled.ui
+HEADERS=test_file.h
+SOURCES=\
+ test_file.cpp\
+ main.cpp
+CONFIG -= debug_and_release_target
+
+
diff --git a/tests/auto/qmake/testdata/include_dir/main.cpp b/tests/auto/qmake/testdata/include_dir/main.cpp
new file mode 100644
index 0000000..494bbee
--- /dev/null
+++ b/tests/auto/qmake/testdata/include_dir/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "test_file.h"
+#include <qapplication.h>
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv );
+ SomeObject sc;
+ return a.exec();
+}
diff --git a/tests/auto/qmake/testdata/include_dir/test_file.cpp b/tests/auto/qmake/testdata/include_dir/test_file.cpp
new file mode 100644
index 0000000..c6ddcba
--- /dev/null
+++ b/tests/auto/qmake/testdata/include_dir/test_file.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "test_file.h"
+
+SomeObject::SomeObject() : QWidget()
+{
+ setupUi( this );
+}
diff --git a/tests/auto/qmake/testdata/include_dir/test_file.h b/tests/auto/qmake/testdata/include_dir/test_file.h
new file mode 100644
index 0000000..a869281
--- /dev/null
+++ b/tests/auto/qmake/testdata/include_dir/test_file.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qwidget.h>
+
+#include "ui_untitled.h"
+
+class SomeObject : public QWidget, public Ui_Form
+{
+ Q_OBJECT
+public:
+ SomeObject();
+signals:
+ void someSignal();
+};
diff --git a/tests/auto/qmake/testdata/include_dir/untitled.ui b/tests/auto/qmake/testdata/include_dir/untitled.ui
new file mode 100644
index 0000000..2aecd3c
--- /dev/null
+++ b/tests/auto/qmake/testdata/include_dir/untitled.ui
@@ -0,0 +1,22 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>Form</class>
+ <widget class="QWidget" name="Form" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Form</string>
+ </property>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/tests/auto/qmake/testdata/include_dir_build/README b/tests/auto/qmake/testdata/include_dir_build/README
new file mode 100644
index 0000000..46017fc
--- /dev/null
+++ b/tests/auto/qmake/testdata/include_dir_build/README
@@ -0,0 +1 @@
+Here to ensure include_dir_build exists
diff --git a/tests/auto/qmake/testdata/install_depends/foo.pro b/tests/auto/qmake/testdata/install_depends/foo.pro
new file mode 100644
index 0000000..357216b
--- /dev/null
+++ b/tests/auto/qmake/testdata/install_depends/foo.pro
@@ -0,0 +1,23 @@
+TEMPLATE=app
+TARGET=foo
+CONFIG -= debug_and_release_target
+
+HEADERS=test_file.h
+SOURCES=\
+ test_file.cpp\
+ main.cpp
+
+test1.files=test1
+test1.path=dist
+INSTALLS+=test1
+
+test2.files=test2
+test2.path=dist
+INSTALLS+=test2
+
+target.path=dist
+target.depends=install_test1 install_test2
+INSTALLS+=target
+
+
+
diff --git a/tests/auto/qmake/testdata/install_depends/main.cpp b/tests/auto/qmake/testdata/install_depends/main.cpp
new file mode 100644
index 0000000..494bbee
--- /dev/null
+++ b/tests/auto/qmake/testdata/install_depends/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "test_file.h"
+#include <qapplication.h>
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv );
+ SomeObject sc;
+ return a.exec();
+}
diff --git a/tests/auto/qmake/testdata/install_depends/test1 b/tests/auto/qmake/testdata/install_depends/test1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/qmake/testdata/install_depends/test1
diff --git a/tests/auto/qmake/testdata/install_depends/test2 b/tests/auto/qmake/testdata/install_depends/test2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/qmake/testdata/install_depends/test2
diff --git a/tests/auto/qmake/testdata/install_depends/test_file.cpp b/tests/auto/qmake/testdata/install_depends/test_file.cpp
new file mode 100644
index 0000000..fd4cdb5
--- /dev/null
+++ b/tests/auto/qmake/testdata/install_depends/test_file.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "test_file.h"
+
+SomeObject::SomeObject() : QObject()
+{
+}
diff --git a/tests/auto/qmake/testdata/install_depends/test_file.h b/tests/auto/qmake/testdata/install_depends/test_file.h
new file mode 100644
index 0000000..a35b0de
--- /dev/null
+++ b/tests/auto/qmake/testdata/install_depends/test_file.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qobject.h>
+
+class SomeObject : public QObject
+{
+ Q_OBJECT
+public:
+ SomeObject();
+signals:
+ void someSignal();
+};
diff --git a/tests/auto/qmake/testdata/one_space/main.cpp b/tests/auto/qmake/testdata/one_space/main.cpp
new file mode 100644
index 0000000..78242a3
--- /dev/null
+++ b/tests/auto/qmake/testdata/one_space/main.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+
+#include <qapplication.h>
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv );
+ return a.exec();
+}
diff --git a/tests/auto/qmake/testdata/one_space/one_space.pro b/tests/auto/qmake/testdata/one_space/one_space.pro
new file mode 100644
index 0000000..247bd27
--- /dev/null
+++ b/tests/auto/qmake/testdata/one_space/one_space.pro
@@ -0,0 +1,10 @@
+TEMPLATE = app
+CONFIG += qt warn_on
+SOURCES = main.cpp
+TARGET = "one space"
+DESTDIR = ./
+
+infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
+infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
+
+
diff --git a/tests/auto/qmake/testdata/operators/operators.pro b/tests/auto/qmake/testdata/operators/operators.pro
new file mode 100644
index 0000000..5285c1a
--- /dev/null
+++ b/tests/auto/qmake/testdata/operators/operators.pro
@@ -0,0 +1,24 @@
+CONFIG = qt thread
+
+CONFIG += debug
+!contains( CONFIG, debug ) {
+ message( "FAILED: +=" )
+}
+
+CONFIG -= thread
+contains( CONFIG, thread ) {
+ message( "FAILED: -=" )
+}
+
+CONFIG = thread
+CONFIG *= thread
+!count( CONFIG, 1 ) {
+ message( "FAILED: *=" )
+}
+
+CONFIG = thread QT_DLL debug
+CONFIG ~= s/QT_+/Q_
+!contains( CONFIG, Q_DLL ) {
+ message( "FAILED: ~=" )
+}
+
diff --git a/tests/auto/qmake/testdata/prompt/prompt.pro b/tests/auto/qmake/testdata/prompt/prompt.pro
new file mode 100644
index 0000000..02db4fe
--- /dev/null
+++ b/tests/auto/qmake/testdata/prompt/prompt.pro
@@ -0,0 +1,2 @@
+a = $$prompt(Prompteroo)
+
diff --git a/tests/auto/qmake/testdata/quotedfilenames/main.cpp b/tests/auto/qmake/testdata/quotedfilenames/main.cpp
new file mode 100644
index 0000000..40a402e
--- /dev/null
+++ b/tests/auto/qmake/testdata/quotedfilenames/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+
+#include <qapplication.h>
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv );
+ return a.exec();
+}
+
diff --git a/tests/auto/qmake/testdata/quotedfilenames/quotedfilenames.pro b/tests/auto/qmake/testdata/quotedfilenames/quotedfilenames.pro
new file mode 100644
index 0000000..7f22f43
--- /dev/null
+++ b/tests/auto/qmake/testdata/quotedfilenames/quotedfilenames.pro
@@ -0,0 +1,22 @@
+TEMPLATE = app
+CONFIG += qt warn_on
+TARGET = quotedfilenames
+SOURCES = main.cpp
+
+RCCINPUT = "rc folder/test.qrc"
+RCCOUTPUT = test.cpp
+
+rcc_test.commands = rcc -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+rcc_test.output = $$RCCOUTPUT
+rcc_test.input = RCCINPUT
+rcc_test.variable_out = SOURCES
+rcc_test.name = RCC_TEST
+rcc_test.CONFIG += no_link
+rcc_test.depends = $$QMAKE_RCC
+
+QMAKE_EXTRA_COMPILERS += rcc_test
+
+DESTDIR = ./
+
+
+
diff --git a/tests/auto/qmake/testdata/quotedfilenames/rc folder/logo.png b/tests/auto/qmake/testdata/quotedfilenames/rc folder/logo.png
new file mode 100644
index 0000000..bb07d76
--- /dev/null
+++ b/tests/auto/qmake/testdata/quotedfilenames/rc folder/logo.png
Binary files differ
diff --git a/tests/auto/qmake/testdata/quotedfilenames/rc folder/test.qrc b/tests/auto/qmake/testdata/quotedfilenames/rc folder/test.qrc
new file mode 100644
index 0000000..54ec5dc
--- /dev/null
+++ b/tests/auto/qmake/testdata/quotedfilenames/rc folder/test.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>logo.png</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/qmake/testdata/shadow_files/foo.pro b/tests/auto/qmake/testdata/shadow_files/foo.pro
new file mode 100644
index 0000000..fc1e7e5
--- /dev/null
+++ b/tests/auto/qmake/testdata/shadow_files/foo.pro
@@ -0,0 +1,17 @@
+TEMPLATE=app
+CONFIG -= debug_and_release_target
+TARGET=foo
+HEADERS=test_file.h
+SOURCES=\
+ test_file.cpp\
+ main.cpp
+
+target.path=dist
+INSTALLS+=target
+
+test.files=test.txt foo.bar
+test.path=dist
+INSTALLS+=test
+
+
+
diff --git a/tests/auto/qmake/testdata/shadow_files/main.cpp b/tests/auto/qmake/testdata/shadow_files/main.cpp
new file mode 100644
index 0000000..494bbee
--- /dev/null
+++ b/tests/auto/qmake/testdata/shadow_files/main.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "test_file.h"
+#include <qapplication.h>
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv );
+ SomeObject sc;
+ return a.exec();
+}
diff --git a/tests/auto/qmake/testdata/shadow_files/test.txt b/tests/auto/qmake/testdata/shadow_files/test.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/qmake/testdata/shadow_files/test.txt
diff --git a/tests/auto/qmake/testdata/shadow_files/test_file.cpp b/tests/auto/qmake/testdata/shadow_files/test_file.cpp
new file mode 100644
index 0000000..fd4cdb5
--- /dev/null
+++ b/tests/auto/qmake/testdata/shadow_files/test_file.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "test_file.h"
+
+SomeObject::SomeObject() : QObject()
+{
+}
diff --git a/tests/auto/qmake/testdata/shadow_files/test_file.h b/tests/auto/qmake/testdata/shadow_files/test_file.h
new file mode 100644
index 0000000..a35b0de
--- /dev/null
+++ b/tests/auto/qmake/testdata/shadow_files/test_file.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qobject.h>
+
+class SomeObject : public QObject
+{
+ Q_OBJECT
+public:
+ SomeObject();
+signals:
+ void someSignal();
+};
diff --git a/tests/auto/qmake/testdata/shadow_files_build/README b/tests/auto/qmake/testdata/shadow_files_build/README
new file mode 100644
index 0000000..46017fc
--- /dev/null
+++ b/tests/auto/qmake/testdata/shadow_files_build/README
@@ -0,0 +1 @@
+Here to ensure include_dir_build exists
diff --git a/tests/auto/qmake/testdata/shadow_files_build/foo.bar b/tests/auto/qmake/testdata/shadow_files_build/foo.bar
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/auto/qmake/testdata/shadow_files_build/foo.bar
diff --git a/tests/auto/qmake/testdata/simple_app/main.cpp b/tests/auto/qmake/testdata/simple_app/main.cpp
new file mode 100644
index 0000000..3fd8456
--- /dev/null
+++ b/tests/auto/qmake/testdata/simple_app/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+
+#include "test_file.h"
+#include <qapplication.h>
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv );
+ SomeObject sc;
+ return a.exec();
+}
diff --git a/tests/auto/qmake/testdata/simple_app/simple_app.pro b/tests/auto/qmake/testdata/simple_app/simple_app.pro
new file mode 100644
index 0000000..f496d5b
--- /dev/null
+++ b/tests/auto/qmake/testdata/simple_app/simple_app.pro
@@ -0,0 +1,12 @@
+TEMPLATE = app
+CONFIG += qt warn_on
+HEADERS = test_file.h
+SOURCES = test_file.cpp \
+ main.cpp
+TARGET = simple_app
+DESTDIR = ./
+
+infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
+infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
+
+
diff --git a/tests/auto/qmake/testdata/simple_app/test_file.cpp b/tests/auto/qmake/testdata/simple_app/test_file.cpp
new file mode 100644
index 0000000..fd4cdb5
--- /dev/null
+++ b/tests/auto/qmake/testdata/simple_app/test_file.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "test_file.h"
+
+SomeObject::SomeObject() : QObject()
+{
+}
diff --git a/tests/auto/qmake/testdata/simple_app/test_file.h b/tests/auto/qmake/testdata/simple_app/test_file.h
new file mode 100644
index 0000000..a35b0de
--- /dev/null
+++ b/tests/auto/qmake/testdata/simple_app/test_file.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qobject.h>
+
+class SomeObject : public QObject
+{
+ Q_OBJECT
+public:
+ SomeObject();
+signals:
+ void someSignal();
+};
diff --git a/tests/auto/qmake/testdata/simple_dll/simple.cpp b/tests/auto/qmake/testdata/simple_dll/simple.cpp
new file mode 100644
index 0000000..e1acaff
--- /dev/null
+++ b/tests/auto/qmake/testdata/simple_dll/simple.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "simple.h"
+
+Simple::Simple()
+{
+}
+
+Simple::~Simple()
+{
+}
+
+QString Simple::test()
+{
+ return "This is a test";
+}
diff --git a/tests/auto/qmake/testdata/simple_dll/simple.h b/tests/auto/qmake/testdata/simple_dll/simple.h
new file mode 100644
index 0000000..2ecef0b
--- /dev/null
+++ b/tests/auto/qmake/testdata/simple_dll/simple.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef SIMPLE_H
+#define SIMPLE_H
+
+#include <qstring.h>
+
+//class SIMPLEDLL_EXPORT Simple
+class Simple
+{
+public:
+ Simple();
+ ~Simple();
+
+ QString test();
+};
+
+#endif
+
+
+
diff --git a/tests/auto/qmake/testdata/simple_dll/simple_dll.pro b/tests/auto/qmake/testdata/simple_dll/simple_dll.pro
new file mode 100644
index 0000000..9af38ec
--- /dev/null
+++ b/tests/auto/qmake/testdata/simple_dll/simple_dll.pro
@@ -0,0 +1,19 @@
+TEMPLATE = lib
+CONFIG += qt warn_on dll
+
+win32:DEFINES += SIMPLEDLL_MAKEDLL
+
+HEADERS = simple.h
+SOURCES = simple.cpp
+
+VERSION = 1.0.0
+INCLUDEPATH += . tmp
+MOC_DIR = tmp
+OBJECTS_DIR = tmp
+TARGET = simple_dll
+DESTDIR = ./
+
+infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
+infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
+
+
diff --git a/tests/auto/qmake/testdata/simple_lib/simple.cpp b/tests/auto/qmake/testdata/simple_lib/simple.cpp
new file mode 100644
index 0000000..e1acaff
--- /dev/null
+++ b/tests/auto/qmake/testdata/simple_lib/simple.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "simple.h"
+
+Simple::Simple()
+{
+}
+
+Simple::~Simple()
+{
+}
+
+QString Simple::test()
+{
+ return "This is a test";
+}
diff --git a/tests/auto/qmake/testdata/simple_lib/simple.h b/tests/auto/qmake/testdata/simple_lib/simple.h
new file mode 100644
index 0000000..0072cd4
--- /dev/null
+++ b/tests/auto/qmake/testdata/simple_lib/simple.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef SIMPLE_H
+#define SIMPLE_H
+
+#include <qstring.h>
+
+class Simple
+{
+public:
+ Simple();
+ ~Simple();
+
+ QString test();
+};
+
+#endif
+
+
+
diff --git a/tests/auto/qmake/testdata/simple_lib/simple_lib.pro b/tests/auto/qmake/testdata/simple_lib/simple_lib.pro
new file mode 100644
index 0000000..209bba6
--- /dev/null
+++ b/tests/auto/qmake/testdata/simple_lib/simple_lib.pro
@@ -0,0 +1,14 @@
+TEMPLATE = lib
+CONFIG += qt warn_on release staticlib
+CONFIG -= dll
+
+HEADERS = simple.h
+SOURCES = simple.cpp
+
+VERSION = 1.0.0
+INCLUDEPATH += . tmp
+MOC_DIR = tmp
+OBJECTS_DIR = tmp
+TARGET = simple_lib
+DESTDIR = ./
+
diff --git a/tests/auto/qmake/testdata/subdirs/simple_app/main.cpp b/tests/auto/qmake/testdata/subdirs/simple_app/main.cpp
new file mode 100644
index 0000000..3fd8456
--- /dev/null
+++ b/tests/auto/qmake/testdata/subdirs/simple_app/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+
+#include "test_file.h"
+#include <qapplication.h>
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv );
+ SomeObject sc;
+ return a.exec();
+}
diff --git a/tests/auto/qmake/testdata/subdirs/simple_app/simple_app.pro b/tests/auto/qmake/testdata/subdirs/simple_app/simple_app.pro
new file mode 100644
index 0000000..f496d5b
--- /dev/null
+++ b/tests/auto/qmake/testdata/subdirs/simple_app/simple_app.pro
@@ -0,0 +1,12 @@
+TEMPLATE = app
+CONFIG += qt warn_on
+HEADERS = test_file.h
+SOURCES = test_file.cpp \
+ main.cpp
+TARGET = simple_app
+DESTDIR = ./
+
+infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
+infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
+
+
diff --git a/tests/auto/qmake/testdata/subdirs/simple_app/test_file.cpp b/tests/auto/qmake/testdata/subdirs/simple_app/test_file.cpp
new file mode 100644
index 0000000..fd4cdb5
--- /dev/null
+++ b/tests/auto/qmake/testdata/subdirs/simple_app/test_file.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "test_file.h"
+
+SomeObject::SomeObject() : QObject()
+{
+}
diff --git a/tests/auto/qmake/testdata/subdirs/simple_app/test_file.h b/tests/auto/qmake/testdata/subdirs/simple_app/test_file.h
new file mode 100644
index 0000000..a35b0de
--- /dev/null
+++ b/tests/auto/qmake/testdata/subdirs/simple_app/test_file.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qobject.h>
+
+class SomeObject : public QObject
+{
+ Q_OBJECT
+public:
+ SomeObject();
+signals:
+ void someSignal();
+};
diff --git a/tests/auto/qmake/testdata/subdirs/simple_dll/simple.cpp b/tests/auto/qmake/testdata/subdirs/simple_dll/simple.cpp
new file mode 100644
index 0000000..e1acaff
--- /dev/null
+++ b/tests/auto/qmake/testdata/subdirs/simple_dll/simple.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "simple.h"
+
+Simple::Simple()
+{
+}
+
+Simple::~Simple()
+{
+}
+
+QString Simple::test()
+{
+ return "This is a test";
+}
diff --git a/tests/auto/qmake/testdata/subdirs/simple_dll/simple.h b/tests/auto/qmake/testdata/subdirs/simple_dll/simple.h
new file mode 100644
index 0000000..2ecef0b
--- /dev/null
+++ b/tests/auto/qmake/testdata/subdirs/simple_dll/simple.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef SIMPLE_H
+#define SIMPLE_H
+
+#include <qstring.h>
+
+//class SIMPLEDLL_EXPORT Simple
+class Simple
+{
+public:
+ Simple();
+ ~Simple();
+
+ QString test();
+};
+
+#endif
+
+
+
diff --git a/tests/auto/qmake/testdata/subdirs/simple_dll/simple_dll.pro b/tests/auto/qmake/testdata/subdirs/simple_dll/simple_dll.pro
new file mode 100644
index 0000000..a54a07a
--- /dev/null
+++ b/tests/auto/qmake/testdata/subdirs/simple_dll/simple_dll.pro
@@ -0,0 +1,20 @@
+include($(QTDIR)/.qmake.cache)
+TEMPLATE = lib
+CONFIG += qt warn_on dll
+
+win32:DEFINES += SIMPLEDLL_MAKEDLL
+
+HEADERS = simple.h
+SOURCES = simple.cpp
+
+VERSION = 1.0.0
+INCLUDEPATH += . tmp
+MOC_DIR = tmp
+OBJECTS_DIR = tmp
+TARGET = simple_dll
+DESTDIR = ./
+
+infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
+infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
+
+
diff --git a/tests/auto/qmake/testdata/subdirs/subdirs.pro b/tests/auto/qmake/testdata/subdirs/subdirs.pro
new file mode 100644
index 0000000..5da200e
--- /dev/null
+++ b/tests/auto/qmake/testdata/subdirs/subdirs.pro
@@ -0,0 +1,6 @@
+TEMPLATE = subdirs
+SUBDIRS = simple_app \
+ simple_dll
+CONFIG += ordered
+
+
diff --git a/tests/auto/qmake/testdata/variables/variables.pro b/tests/auto/qmake/testdata/variables/variables.pro
new file mode 100644
index 0000000..cefcddf
--- /dev/null
+++ b/tests/auto/qmake/testdata/variables/variables.pro
@@ -0,0 +1,14 @@
+CONFIG = 1 2 3 4 5
+JOINEDCONFIG = $$join( CONFIG, "-GLUE-", "-BEFORE-", "-AFTER-" )
+!contains( JOINEDCONFIG, -BEFORE-1-GLUE-2-GLUE-3-GLUE-4-GLUE-5-AFTER- ) {
+ message( "FAILED: join [$$JOINEDCONFIG != -BEFORE-1-GLUE-2-GLUE-3-GLUE-4-GLUE-5-AFTER-]" )
+}
+
+# To test member we need to use join
+NEWCONFIG = $$member( CONFIG, 4 ) $$member( CONFIG, 3 ) $$member( CONFIG, 2 )
+JOINEDNEWCONFIG = $$join( NEWCONFIG, "-" )
+!contains( JOINEDNEWCONFIG, 5-4-3 ) {
+ message( "FAILED: member [$$JOINEDNEWCONFIG != 5-4-3]" )
+}
+
+
diff --git a/tests/auto/qmake/tst_qmake.cpp b/tests/auto/qmake/tst_qmake.cpp
new file mode 100644
index 0000000..4840b42
--- /dev/null
+++ b/tests/auto/qmake/tst_qmake.cpp
@@ -0,0 +1,385 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QtTest/QtTest>
+
+#if !defined(QMAKE_CROSS_COMPILED) && defined(QT3_SUPPORT)
+
+#include <qdir.h>
+#include <qprocess.h>
+
+
+#include "testcompiler.h"
+
+#include <stdlib.h>
+
+//TESTED_CLASS=
+//TESTED_FILES=corelib/tools/qlocale.h corelib/tools/qlocale.cpp
+
+class tst_qmake : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_qmake();
+ virtual ~tst_qmake();
+
+
+public slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+private slots:
+ void simple_app();
+ void simple_lib();
+ void simple_dll();
+ void subdirs();
+ void functions();
+ void operators();
+ void variables();
+ void func_export();
+ void func_variables();
+ void comments();
+ void duplicateLibraryEntries();
+ void export_across_file_boundaries();
+ void include_dir();
+ void install_files();
+ void install_depends();
+ void quotedfilenames();
+ void prompt();
+ void one_space();
+ void findMocs();
+ void findDeps();
+
+private:
+ TestCompiler test_compiler;
+ QString base_path;
+};
+
+tst_qmake::tst_qmake()
+{
+ QString cmd = QString("qmake \"QT_VERSION=%1\"").arg(QT_VERSION);
+#ifdef Q_CC_MSVC
+ test_compiler.setBaseCommands( "nmake", cmd, FALSE );
+#elif defined(Q_CC_MINGW)
+ test_compiler.setBaseCommands( "mingw32-make", cmd, FALSE );
+#elif defined(Q_OS_WIN) && defined(Q_CC_GNU)
+ test_compiler.setBaseCommands( "mmmake", cmd, FALSE );
+#else
+ test_compiler.setBaseCommands( "make", cmd, FALSE );
+#endif
+ QDir dir;
+ base_path = dir.currentDirPath();
+}
+
+tst_qmake::~tst_qmake()
+{
+
+}
+
+void tst_qmake::initTestCase()
+{
+}
+
+void tst_qmake::cleanupTestCase()
+{
+}
+
+void tst_qmake::init()
+{
+}
+
+void tst_qmake::cleanup()
+{
+}
+
+void tst_qmake::simple_app()
+{
+ QString workDir = base_path + "/testdata/simple_app";
+
+ QVERIFY( test_compiler.qmake( workDir, "simple_app" ));
+ QVERIFY( test_compiler.make( workDir ));
+ QVERIFY( test_compiler.exists( workDir, "simple_app", Exe, "1.0.0" ));
+ QVERIFY( test_compiler.makeClean( workDir ));
+ QVERIFY( test_compiler.exists( workDir, "simple_app", Exe, "1.0.0" )); // Should still exist after a make clean
+ QVERIFY( test_compiler.makeDistClean( workDir ));
+ QVERIFY( !test_compiler.exists( workDir, "simple_app", Exe, "1.0.0" )); // Should not exist after a make distclean
+ QVERIFY( test_compiler.removeMakefile( workDir ) );
+}
+
+void tst_qmake::simple_dll()
+{
+ QString workDir = base_path + "/testdata/simple_dll";
+
+ QDir D;
+ D.remove( workDir + "/Makefile");
+ QVERIFY( test_compiler.qmake( workDir, "simple_dll" ));
+ QVERIFY( test_compiler.make( workDir ));
+ QVERIFY( test_compiler.exists( workDir, "simple_dll", Dll, "1.0.0" ));
+ QVERIFY( test_compiler.makeClean( workDir ));
+ QVERIFY( test_compiler.exists( workDir, "simple_dll", Dll, "1.0.0" )); // Should still exist after a make clean
+ QVERIFY( test_compiler.makeDistClean( workDir ));
+ QVERIFY( !test_compiler.exists( workDir, "simple_dll", Dll, "1.0.0" )); // Should not exist after a make distclean
+ QVERIFY( test_compiler.removeMakefile( workDir ) );
+}
+
+void tst_qmake::simple_lib()
+{
+ QString workDir = base_path + "/testdata/simple_lib";
+
+ QDir D;
+ D.remove( workDir + "/Makefile");
+ QVERIFY( test_compiler.qmake( workDir, "simple_lib" ));
+ QVERIFY( test_compiler.make( workDir ));
+ QVERIFY( test_compiler.exists( workDir, "simple_lib", Lib, "1.0.0" ));
+ QVERIFY( test_compiler.makeClean( workDir ));
+ QVERIFY( test_compiler.exists( workDir, "simple_lib", Lib, "1.0.0" )); // Should still exist after a make clean
+ QVERIFY( test_compiler.makeDistClean( workDir ));
+ QVERIFY( !test_compiler.exists( workDir, "simple_lib", Lib, "1.0.0" )); // Should not exist after a make distclean
+ QVERIFY( test_compiler.removeMakefile( workDir ) );
+}
+
+void tst_qmake::subdirs()
+{
+ QString workDir = base_path + "/testdata/subdirs";
+
+ QDir D;
+ D.remove( workDir + "/simple_app/Makefile");
+ D.remove( workDir + "/simple_dll/Makefile");
+ QVERIFY( test_compiler.qmake( workDir, "subdirs" ));
+ QVERIFY( test_compiler.make( workDir ));
+ QVERIFY( test_compiler.exists( workDir + "/simple_app", "simple_app", Exe, "1.0.0" ));
+ QVERIFY( test_compiler.exists( workDir + "/simple_dll", "simple_dll", Dll, "1.0.0" ));
+ QVERIFY( test_compiler.makeClean( workDir ));
+ // Should still exist after a make clean
+ QVERIFY( test_compiler.exists( workDir + "/simple_app", "simple_app", Exe, "1.0.0" ));
+ QVERIFY( test_compiler.exists( workDir + "/simple_dll", "simple_dll", Dll, "1.0.0" ));
+ // Since subdirs templates do not have a make dist clean, we should clean up ourselves
+ // properly
+ QVERIFY( test_compiler.makeDistClean( workDir ));
+ QVERIFY( test_compiler.removeMakefile( workDir ) );
+}
+
+void tst_qmake::functions()
+{
+ QString workDir = base_path + "/testdata/functions";
+ QVERIFY( test_compiler.qmake( workDir, "functions" ));
+}
+
+void tst_qmake::operators()
+{
+ QString workDir = base_path + "/testdata/operators";
+ QVERIFY( test_compiler.qmake( workDir, "operators" ));
+}
+
+void tst_qmake::variables()
+{
+ QString workDir = base_path + "/testdata/variables";
+ QVERIFY(test_compiler.qmake( workDir, "variables" ));
+}
+
+void tst_qmake::func_export()
+{
+ QString workDir = base_path + "/testdata/func_export";
+ QVERIFY(test_compiler.qmake( workDir, "func_export" ));
+}
+
+void tst_qmake::func_variables()
+{
+ QString workDir = base_path + "/testdata/func_variables";
+ QVERIFY(test_compiler.qmake( workDir, "func_variables" ));
+}
+
+void tst_qmake::comments()
+{
+ QString workDir = base_path + "/testdata/comments";
+ QVERIFY(test_compiler.qmake( workDir, "comments" ));
+}
+
+void tst_qmake::duplicateLibraryEntries()
+{
+ QVERIFY(true);
+ /* TODO: this test does not work as the problem it tests doesn't happen
+ until after the parsing of the pro-file and thus has to be tested
+ by parsing the Makefile. This is not doable with the current
+ testcompiler framework and has as such been put on hold.
+
+ QString workDir = base_path + "/testdata/duplicateLibraryEntries";
+ QVERIFY(test_compiler.qmake(workDir, "duplicateLibraryEntries")); */
+}
+
+void tst_qmake::export_across_file_boundaries()
+{
+ // This relies on features so we need to set the QMAKEFEATURES environment variable
+ putenv("QMAKEFEATURES=.");
+ QString workDir = base_path + "/testdata/export_across_file_boundaries";
+ QVERIFY( test_compiler.qmake( workDir, "foo" ));
+ putenv("QMAKEFEATURES=");
+}
+
+void tst_qmake::include_dir()
+{
+ QString workDir = base_path + "/testdata/include_dir";
+ QVERIFY( test_compiler.qmake( workDir, "foo" ));
+ QVERIFY( test_compiler.make( workDir ));
+ QVERIFY( test_compiler.exists( workDir, "foo", Exe, "1.0.0" ));
+ QVERIFY( test_compiler.makeDistClean( workDir ));
+
+ QString buildDir = base_path + "/testdata/include_dir_build";
+ QVERIFY( test_compiler.qmake( workDir, "foo", buildDir ));
+ QVERIFY( test_compiler.make( buildDir ));
+ QVERIFY( test_compiler.exists( buildDir, "foo", Exe, "1.0.0" ));
+ QVERIFY( test_compiler.makeDistClean( buildDir ));
+}
+
+void tst_qmake::install_files()
+{
+ QString workDir = base_path + "/testdata/shadow_files";
+ QVERIFY( test_compiler.qmake( workDir, "foo" ));
+ QVERIFY( test_compiler.make( workDir ));
+ QVERIFY( test_compiler.exists( workDir, "foo", Exe, "1.0.0" ));
+ QVERIFY( test_compiler.make( workDir, "install" ));
+ QVERIFY( test_compiler.exists( workDir + "/dist", "foo", Exe, "1.0.0" ));
+ QVERIFY( test_compiler.exists( workDir + "/dist", "test.txt", Plain, "1.0.0" ));
+ QVERIFY( test_compiler.make( workDir, "uninstall" ));
+ QVERIFY( test_compiler.makeDistClean( workDir ));
+
+ QString buildDir = base_path + "/testdata/shadow_files_build";
+ QVERIFY( test_compiler.qmake( workDir, "foo", buildDir ));
+ QVERIFY( test_compiler.make( buildDir ));
+ QVERIFY( test_compiler.exists( buildDir, "foo", Exe, "1.0.0" ));
+ QVERIFY( test_compiler.make( buildDir, "install" ));
+ QVERIFY( test_compiler.exists( workDir + "/dist", "foo", Exe, "1.0.0" ));
+ QVERIFY( test_compiler.exists( workDir + "/dist", "test.txt", Plain, "1.0.0" ));
+ QVERIFY( test_compiler.exists( workDir + "/dist", "foo.bar", Plain, "1.0.0" ));
+ QVERIFY( test_compiler.make( buildDir, "uninstall" ));
+ QVERIFY( test_compiler.makeDistClean( buildDir ));
+}
+
+void tst_qmake::install_depends()
+{
+ QString workDir = base_path + "/testdata/install_depends";
+ QVERIFY( test_compiler.qmake( workDir, "foo" ));
+ QVERIFY( test_compiler.make( workDir ));
+ QVERIFY( test_compiler.exists( workDir, "foo", Exe, "1.0.0" ));
+ QVERIFY( test_compiler.make( workDir, "install" ));
+ QVERIFY( test_compiler.exists( workDir + "/dist", "foo", Exe, "1.0.0" ));
+ QVERIFY( test_compiler.exists( workDir + "/dist", "test1", Plain, "1.0.0" ));
+ QVERIFY( test_compiler.exists( workDir + "/dist", "test2", Plain, "1.0.0" ));
+ QVERIFY( test_compiler.make( workDir, "uninstall" ));
+ QVERIFY( test_compiler.makeDistClean( workDir ));
+}
+void tst_qmake::quotedfilenames()
+{
+ QString workDir = base_path + "/testdata/quotedfilenames";
+ QVERIFY( test_compiler.qmake( workDir, "quotedfilenames" ));
+ QVERIFY( test_compiler.makeClean( workDir ));
+ QVERIFY( test_compiler.make( workDir ));
+ QVERIFY( test_compiler.exists( workDir, "quotedfilenames", Exe, "1.0.0" ));
+}
+
+void tst_qmake::prompt()
+{
+#if 0
+ QProcess qmake;
+ qmake.setReadChannelMode(QProcess::MergedChannels);
+ qmake.setWorkingDirectory(QLatin1String("testdata/prompt"));
+ qmake.start(QLatin1String("qmake CONFIG-=debug_and_release CONFIG-=debug CONFIG+=release"),
+ QIODevice::Text | QIODevice::ReadWrite);
+ QVERIFY(qmake.waitForStarted(20000));
+ QByteArray read = qmake.readAll();
+ qDebug() << read;
+ QCOMPARE(read, QByteArray("Project PROMPT: Prompteroo? "));
+ qmake.write("promptetiprompt\n");
+ QVERIFY(qmake.waitForFinished(20000));
+#endif
+}
+
+void tst_qmake::one_space()
+{
+ QString workDir = base_path + "/testdata/one_space";
+
+ QVERIFY( test_compiler.qmake( workDir, "one_space" ));
+ QVERIFY( test_compiler.make( workDir ));
+ QVERIFY( test_compiler.exists( workDir, "one space", Exe, "1.0.0" ));
+ QVERIFY( test_compiler.makeClean( workDir ));
+ QVERIFY( test_compiler.exists( workDir, "one space", Exe, "1.0.0" )); // Should still exist after a make clean
+ QVERIFY( test_compiler.makeDistClean( workDir ));
+ QVERIFY( !test_compiler.exists( workDir, "one space", Exe, "1.0.0" )); // Should not exist after a make distclean
+ QVERIFY( test_compiler.removeMakefile( workDir ) );
+}
+
+void tst_qmake::findMocs()
+{
+ QString workDir = base_path + "/testdata/findMocs";
+
+ QVERIFY( test_compiler.qmake(workDir, "findMocs") );
+ QVERIFY( test_compiler.make(workDir) );
+ QVERIFY( test_compiler.exists(workDir, "findMocs", Exe, "1.0.0" ) );
+ QVERIFY( test_compiler.makeClean(workDir) );
+ QVERIFY( test_compiler.exists(workDir, "findMocs", Exe, "1.0.0" ) );
+ QVERIFY( test_compiler.makeDistClean(workDir ) );
+ QVERIFY( !test_compiler.exists(workDir, "findMocs", Exe, "1.0.0" ) );
+ QVERIFY( test_compiler.removeMakefile(workDir) );
+}
+
+void tst_qmake::findDeps()
+{
+ QString workDir = base_path + "/testdata/findDeps";
+
+ QVERIFY( test_compiler.qmake(workDir, "findDeps") );
+ QVERIFY( test_compiler.make(workDir) );
+ QVERIFY( test_compiler.exists(workDir, "findDeps", Exe, "1.0.0" ) );
+ QVERIFY( test_compiler.makeClean(workDir) );
+ QVERIFY( test_compiler.exists(workDir, "findDeps", Exe, "1.0.0" ) );
+ QVERIFY( test_compiler.makeDistClean(workDir ) );
+ QVERIFY( !test_compiler.exists(workDir, "findDeps", Exe, "1.0.0" ) );
+ QVERIFY( test_compiler.removeMakefile(workDir) );
+}
+
+QTEST_MAIN(tst_qmake)
+#include "tst_qmake.moc"
+
+#else // QMAKE_CROSS_COMPILED
+QTEST_NOOP_MAIN
+#endif