summaryrefslogtreecommitdiff
path: root/tests/auto
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-08-23 16:31:50 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-08-26 10:33:32 +0200
commit9f2e842af96885b6d358d32340a212790cf5cfd5 (patch)
tree6931da5c3e3c2ba3e32c010189dbd1bcbf66088b /tests/auto
parent6798f6a8709fe82a1c67b656d4321e75936549a2 (diff)
downloadqbs-9f2e842af96885b6d358d32340a212790cf5cfd5.tar.gz
Take the condition of a "filetagsFilter" group into account.
We currently ignore it. Task-number: QBS-380 Change-Id: Ifcef14b7c72afa716648c206115482c3f9b73681 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/api/tst_api.cpp24
-rw-r--r--tests/auto/api/tst_api.h1
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/api/tst_api.cpp b/tests/auto/api/tst_api.cpp
index d506ba1c0..79582ad2a 100644
--- a/tests/auto/api/tst_api.cpp
+++ b/tests/auto/api/tst_api.cpp
@@ -63,6 +63,30 @@ TestApi::~TestApi()
delete m_logSink;
}
+void TestApi::disabledInstallGroup()
+{
+ qbs::SetupProjectParameters setupParams = defaultSetupParameters();
+ setupParams.setProjectFilePath(QDir::cleanPath(QLatin1String(SRCDIR "/testdata"
+ "/disabled_install_group/project.qbs")));
+ QScopedPointer<qbs::SetupProjectJob> job(qbs::Project::setupProject(setupParams,
+ m_logSink, 0));
+ QEventLoop loop;
+ connect(job.data(), SIGNAL(finished(bool,qbs::AbstractJob*)), &loop, SLOT(quit()));
+ loop.exec();
+ QVERIFY2(!job->error().hasError(), qPrintable(job->error().toString()));
+ qbs::Project project = job->project();
+ qbs::ProjectData projectData = project.projectData();
+ QCOMPARE(projectData.allProducts().count(), 1);
+ qbs::ProductData product = projectData.allProducts().first();
+ const QList<qbs::TargetArtifact> targets = product.targetArtifacts();
+ QCOMPARE(targets.count(), 1);
+ QVERIFY(targets.first().isExecutable());
+ QList<qbs::InstallableFile> installableFiles
+ = project.installableFilesForProduct(product, qbs::InstallOptions());
+ QCOMPARE(installableFiles.count(), 0);
+ QCOMPARE(project.targetExecutable(product, qbs::InstallOptions()), targets.first().filePath());
+}
+
void TestApi::installableFiles()
{
qbs::SetupProjectParameters setupParams = defaultSetupParameters();
diff --git a/tests/auto/api/tst_api.h b/tests/auto/api/tst_api.h
index 473b493fd..365d87942 100644
--- a/tests/auto/api/tst_api.h
+++ b/tests/auto/api/tst_api.h
@@ -46,6 +46,7 @@ public:
~TestApi();
private slots:
+ void disabledInstallGroup();
void installableFiles();
private: