summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmake/testcompiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qmake/testcompiler.h')
-rw-r--r--tests/auto/qmake/testcompiler.h49
1 files changed, 12 insertions, 37 deletions
diff --git a/tests/auto/qmake/testcompiler.h b/tests/auto/qmake/testcompiler.h
index 597d440e08..41e51774f4 100644
--- a/tests/auto/qmake/testcompiler.h
+++ b/tests/auto/qmake/testcompiler.h
@@ -41,33 +41,22 @@
#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"
+#include <QObject>
+#include <QStringList>
enum BuildType { Exe, Dll, Lib, Plain };
class TestCompiler : public QObject
{
-Q_OBJECT
+ 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 );
+ void setBaseCommands( QString makeCmd, QString qmakeCmd );
+ void resetEnvironment();
+ void addToEnvironment( QString varAssignment );
// executes a make clean in the specified workPath
bool makeClean( const QString &workPath );
@@ -77,34 +66,20 @@ public:
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 runCommand( QString cmdLine );
- 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;
+ QString makeCmd_;
+ QString qmakeCmd_;
+ QStringList environment_;
-private slots:
- void childReady();
- void childHasData();
+ // need to make this available somewhere
+ QStringList testOutput_;
};
-#endif // QT3_SUPPORT
#endif // TESTCOMPILER_H