aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/tst_blackbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/blackbox/tst_blackbox.cpp')
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp65
1 files changed, 63 insertions, 2 deletions
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index f4092c666..21db45279 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -4613,7 +4613,7 @@ void TestBlackbox::auxiliaryInputsFromDependencies()
QVERIFY2(m_qbsStdout.contains("generating dummy.out"), m_qbsStdout.constData());
}
-void TestBlackbox::nsis()
+static bool haveMakeNsis()
{
QStringList regKeys;
regKeys << QLatin1String("HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\NSIS")
@@ -4638,7 +4638,12 @@ void TestBlackbox::nsis()
}
}
- if (!haveMakeNsis) {
+ return haveMakeNsis;
+}
+
+void TestBlackbox::nsis()
+{
+ if (!haveMakeNsis()) {
QSKIP("makensis is not installed");
return;
}
@@ -4651,6 +4656,19 @@ void TestBlackbox::nsis()
QVERIFY(!QFile::exists(defaultInstallRoot + "/you-should-not-see-a-file-with-this-name.exe"));
}
+void TestBlackbox::nsisDependencies()
+{
+ if (!haveMakeNsis()) {
+ QSKIP("makensis is not installed");
+ return;
+ }
+
+ bool targetIsWindows = targetOs() == HostOsInfo::HostOsWindows;
+ QDir::setCurrent(testDataDir + "/nsisDependencies");
+ QCOMPARE(runQbs(), 0);
+ QCOMPARE(m_qbsStdout.contains("compiling hello.nsi"), targetIsWindows);
+}
+
void TestBlackbox::enableExceptions()
{
QFETCH(QString, file);
@@ -4812,6 +4830,30 @@ void TestBlackbox::wix()
}
}
+void TestBlackbox::wixDependencies()
+{
+ const SettingsPtr s = settings();
+ Profile profile(profileName(), s.get());
+
+ if (!haveWiX(profile)) {
+ QSKIP("WiX is not installed");
+ return;
+ }
+
+ QByteArray arch = profile.value("qbs.architecture").toString().toLatin1();
+ if (arch.isEmpty())
+ arch = QByteArrayLiteral("x86");
+
+ QDir::setCurrent(testDataDir + "/wixDependencies");
+ QbsRunParameters params;
+ if (!HostOsInfo::isWindowsHost())
+ params.arguments << "qbs.targetOS:windows";
+ QCOMPARE(runQbs(params), 0);
+ QVERIFY2(m_qbsStdout.contains("compiling QbsSetup.wxs"), m_qbsStdout);
+ QVERIFY2(m_qbsStdout.contains("linking qbs.msi"), m_qbsStdout);
+ QVERIFY(regularFileExists(relativeBuildDir() + "/qbs.msi"));
+}
+
void TestBlackbox::nodejs()
{
const SettingsPtr s = settings();
@@ -4964,6 +5006,25 @@ void TestBlackbox::innoSetup()
QVERIFY(regularFileExists(relativeProductBuildDir("Example1") + "/Example1.exe"));
}
+void TestBlackbox::innoSetupDependencies()
+{
+ const SettingsPtr s = settings();
+ Profile profile(profileName(), s.get());
+
+ if (!haveInnoSetup(profile)) {
+ QSKIP("Inno Setup is not installed");
+ return;
+ }
+
+ QDir::setCurrent(testDataDir + "/innosetupDependencies");
+ QbsRunParameters params;
+ if (!HostOsInfo::isWindowsHost())
+ params.arguments << "qbs.targetOS:windows";
+ QCOMPARE(runQbs(params), 0);
+ QVERIFY(m_qbsStdout.contains("compiling test.iss"));
+ QVERIFY(regularFileExists(relativeBuildDir() + "/qbs.setup.test.exe"));
+}
+
void TestBlackbox::outputArtifactAutoTagging()
{
QDir::setCurrent(testDataDir + QLatin1String("/output-artifact-auto-tagging"));