summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKari Oikarinen <kari.oikarinen@qt.io>2019-04-01 09:16:33 +0300
committerKari Oikarinen <kari.oikarinen@qt.io>2019-04-01 09:16:33 +0300
commit18e4cf290048726933bb5cf487e947e65b3550a6 (patch)
tree9e5024b21dbc18cfb8740fc3cda07804aa1470a4 /tests
parentae5db669e8989fe793949346d8061c67e5ec31cd (diff)
parent9e97d64ccd27adcb2053c90cfbcafaef68e53893 (diff)
Merge 5.12 into 5.12.3
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/kernel/qhostinfo/BLACKLIST2
-rw-r--r--tests/auto/tools/qmake/testcompiler.cpp8
-rw-r--r--tests/auto/tools/qmake/testcompiler.h5
-rw-r--r--tests/auto/tools/qmake/testdata/simple_app/simple_app.pro5
-rw-r--r--tests/auto/tools/qmake/tst_qmake.cpp42
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/BLACKLIST3
6 files changed, 60 insertions, 5 deletions
diff --git a/tests/auto/network/kernel/qhostinfo/BLACKLIST b/tests/auto/network/kernel/qhostinfo/BLACKLIST
index 87c5fe991f..cd4d4eb03c 100644
--- a/tests/auto/network/kernel/qhostinfo/BLACKLIST
+++ b/tests/auto/network/kernel/qhostinfo/BLACKLIST
@@ -4,3 +4,5 @@
windows ci
[blockingLookup:a-plus-aaaa]
windows ci
+[reverseLookup:google-public-dns-a.google.com]
+ci
diff --git a/tests/auto/tools/qmake/testcompiler.cpp b/tests/auto/tools/qmake/testcompiler.cpp
index 3276d97354..0a7ba3b40b 100644
--- a/tests/auto/tools/qmake/testcompiler.cpp
+++ b/tests/auto/tools/qmake/testcompiler.cpp
@@ -31,7 +31,7 @@
#include <QProcess>
#include <QDir>
-static QString targetName( BuildType buildMode, const QString& target, const QString& version )
+QString TestCompiler::targetName(BuildType buildMode, const QString& target, const QString& version)
{
Q_UNUSED(version);
QString targetName = target;
@@ -257,7 +257,8 @@ bool TestCompiler::qmakeProject( const QString &workDir, const QString &proName
return runCommand(qmakeCmd_, QStringList() << "-project" << "-o" << projectFile << "DESTDIR=./");
}
-bool TestCompiler::qmake( const QString &workDir, const QString &proName, const QString &buildDir )
+bool TestCompiler::qmake(const QString &workDir, const QString &proName, const QString &buildDir,
+ const QStringList &additionalArguments)
{
QDir D;
D.setCurrent( workDir );
@@ -274,7 +275,8 @@ bool TestCompiler::qmake( const QString &workDir, const QString &proName, const
makeFile += "Makefile";
// Now start qmake and generate the makefile
- return runCommand(qmakeCmd_, QStringList(qmakeArgs_) << projectFile << "-o" << makeFile);
+ return runCommand(qmakeCmd_, QStringList(qmakeArgs_) << projectFile << "-o" << makeFile
+ << additionalArguments);
}
bool TestCompiler::make( const QString &workPath, const QString &target, bool expectFail )
diff --git a/tests/auto/tools/qmake/testcompiler.h b/tests/auto/tools/qmake/testcompiler.h
index d3fe6d88f8..50232669c0 100644
--- a/tests/auto/tools/qmake/testcompiler.h
+++ b/tests/auto/tools/qmake/testcompiler.h
@@ -49,6 +49,8 @@ public:
void resetEnvironment();
void addToEnvironment( QString varAssignment );
+ static QString targetName(BuildType buildMode, const QString& target, 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
@@ -56,7 +58,8 @@ public:
// executes a qmake -project on the specified workDir
bool qmakeProject( const QString &workDir, const QString &proName );
// 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() );
+ bool qmake(const QString &workDir, const QString &proName, const QString &buildDir = QString(),
+ const QStringList &additionalArguments = QStringList());
// executes a make in the specified workPath, with an optional target (eg. install)
bool make( const QString &workPath, const QString &target = QString(), bool expectFail = false );
// checks if the executable exists in destDir
diff --git a/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro b/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro
index 0e78a91f46..f089ac14fc 100644
--- a/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro
+++ b/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro
@@ -5,3 +5,8 @@ SOURCES = test_file.cpp \
RESOURCES = test.qrc
TARGET = "simple app"
DESTDIR = "dest dir"
+
+target.path = $$OUT_PWD/dist
+INSTALLS += target
+
+!build_pass:msvc:CONFIG(debug, debug|release):message("check for pdb, please")
diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp
index 2b822e682f..cacee30c86 100644
--- a/tests/auto/tools/qmake/tst_qmake.cpp
+++ b/tests/auto/tools/qmake/tst_qmake.cpp
@@ -58,6 +58,7 @@ private slots:
void simple_app();
void simple_app_shadowbuild();
void simple_app_shadowbuild2();
+ void simple_app_versioned();
void simple_lib();
void simple_dll();
void subdirs();
@@ -173,10 +174,15 @@ void tst_qmake::simple_app()
{
QString workDir = base_path + "/testdata/simple_app";
QString destDir = workDir + "/dest dir";
+ QString installDir = workDir + "/dist";
- QVERIFY( test_compiler.qmake( workDir, "simple_app" ));
+ QVERIFY( test_compiler.qmake( workDir, "simple_app", QString() ));
QVERIFY( test_compiler.make( workDir ));
QVERIFY( test_compiler.exists( destDir, "simple app", Exe, "1.0.0" ));
+
+ QVERIFY(test_compiler.make(workDir, "install"));
+ QVERIFY(test_compiler.exists(installDir, "simple app", Exe, "1.0.0"));
+
QVERIFY( test_compiler.makeClean( workDir ));
QVERIFY( test_compiler.exists( destDir, "simple app", Exe, "1.0.0" )); // Should still exist after a make clean
QVERIFY( test_compiler.makeDistClean( workDir ));
@@ -216,6 +222,40 @@ void tst_qmake::simple_app_shadowbuild2()
QVERIFY( test_compiler.removeMakefile( buildDir ) );
}
+void tst_qmake::simple_app_versioned()
+{
+ QString workDir = base_path + "/testdata/simple_app";
+ QString buildDir = base_path + "/testdata/simple_app_versioned_build";
+ QString destDir = buildDir + "/dest dir";
+ QString installDir = buildDir + "/dist";
+
+ QString version = "4.5.6";
+ QVERIFY(test_compiler.qmake(workDir, "simple_app", buildDir, QStringList{ "VERSION=" + version }));
+ QString qmakeOutput = test_compiler.commandOutput();
+ QVERIFY(test_compiler.make(buildDir));
+ QVERIFY(test_compiler.exists(destDir, "simple app", Exe, version));
+
+ QString pdbFilePath;
+ bool checkPdb = qmakeOutput.contains("Project MESSAGE: check for pdb, please");
+ if (checkPdb) {
+ QString targetBase = QFileInfo(TestCompiler::targetName(Exe, "simple app", version))
+ .completeBaseName();
+ pdbFilePath = destDir + '/' + targetBase + ".pdb";
+ QVERIFY2(QFile::exists(pdbFilePath), qPrintable(pdbFilePath));
+ QVERIFY(test_compiler.make(buildDir, "install"));
+ QString installedPdbFilePath = installDir + '/' + targetBase + ".pdb";
+ QVERIFY2(QFile::exists(installedPdbFilePath), qPrintable(installedPdbFilePath));
+ }
+
+ QVERIFY(test_compiler.makeClean(buildDir));
+ QVERIFY(test_compiler.exists(destDir, "simple app", Exe, version));
+ QVERIFY(test_compiler.makeDistClean(buildDir));
+ QVERIFY(!test_compiler.exists(destDir, "simple app", Exe, version));
+ if (checkPdb)
+ QVERIFY(!QFile::exists(pdbFilePath));
+ QVERIFY(test_compiler.removeMakefile(buildDir));
+}
+
void tst_qmake::simple_dll()
{
QString workDir = base_path + "/testdata/simple_dll";
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/BLACKLIST b/tests/auto/widgets/graphicsview/qgraphicsitem/BLACKLIST
new file mode 100644
index 0000000000..e760042def
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicsitem/BLACKLIST
@@ -0,0 +1,3 @@
+# QTBUG-74760
+[sorting]
+opensuse-42.3