aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorIvan Komissarov <ABBAPOH@gmail.com>2020-02-02 07:06:57 +0100
committerIvan Komissarov <ABBAPOH@gmail.com>2020-02-14 18:19:21 +0000
commit5adf0d5e8928c1d195d0725195fda86c21e88598 (patch)
treedefac862563935ec37ecd556a5e00e045fe6d1ca /tests
parentbc01b6cc3dc1ee77cfcc3438d8e0d8985016cb65 (diff)
Autotedect MSVC compiler by using a probe
This allows to build projects without calling "qbs setup-toolchains" first by simply calling "qbs build". Change-Id: Iba4af8bf77d0ee5d209564ea371328d3c6cf2aa2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/testdata/empty-profile/empty-profile.qbs3
-rw-r--r--tests/auto/blackbox/testdata/empty-profile/main.cpp1
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp11
-rw-r--r--tests/auto/blackbox/tst_blackbox.h1
4 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/empty-profile/empty-profile.qbs b/tests/auto/blackbox/testdata/empty-profile/empty-profile.qbs
new file mode 100644
index 000000000..da7536315
--- /dev/null
+++ b/tests/auto/blackbox/testdata/empty-profile/empty-profile.qbs
@@ -0,0 +1,3 @@
+CppApplication {
+ files: ["main.cpp"]
+}
diff --git a/tests/auto/blackbox/testdata/empty-profile/main.cpp b/tests/auto/blackbox/testdata/empty-profile/main.cpp
new file mode 100644
index 000000000..76e819701
--- /dev/null
+++ b/tests/auto/blackbox/testdata/empty-profile/main.cpp
@@ -0,0 +1 @@
+int main() { return 0; }
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 797be107f..121f60dd8 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -3438,6 +3438,17 @@ void TestBlackbox::dynamicRuleOutputs()
QVERIFY(!QFile::exists(sourceFile2));
}
+void TestBlackbox::emptyProfile()
+{
+ QDir::setCurrent(testDataDir + "/empty-profile");
+
+ QTemporaryDir tempDir;
+ QbsRunParameters params;
+ params.profile.clear();
+ params.settingsDir = tempDir.path(); // should be no settings here
+ QCOMPARE(runQbs(params), 0);
+}
+
void TestBlackbox::erroneousFiles_data()
{
QTest::addColumn<QString>("errorMessage");
diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h
index 9842ded39..2b83b14e3 100644
--- a/tests/auto/blackbox/tst_blackbox.h
+++ b/tests/auto/blackbox/tst_blackbox.h
@@ -95,6 +95,7 @@ private slots:
void dynamicMultiplexRule();
void dynamicProject();
void dynamicRuleOutputs();
+ void emptyProfile();
void enableExceptions();
void enableExceptions_data();
void enableRtti();