aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2014-01-14 17:17:25 +0100
committerChristian Kandeler <christian.kandeler@digia.com>2014-01-14 17:38:32 +0100
commit4142c7a911f59a135911cce51e0179625e06595f (patch)
treeff346c2e063aa1879b21d4ab758907f1af75f2f3 /tests/auto
parentb457b5efdd2ea80b4d1a8167467a93a2e8a05019 (diff)
Fix API test.
The test project now has more than one installable file, so we can no longer assume that the first one is the application. Change-Id: I6059362c691912cafa46caa948d6b22baa9a289e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/api/tst_api.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/auto/api/tst_api.cpp b/tests/auto/api/tst_api.cpp
index 199227b22..c784f6a86 100644
--- a/tests/auto/api/tst_api.cpp
+++ b/tests/auto/api/tst_api.cpp
@@ -130,12 +130,16 @@ void TestApi::installableFiles()
QList<qbs::InstallableFile> installableFiles
= project.installableFilesForProduct(product, installOptions);
QCOMPARE(installableFiles.count(), 2);
- qbs::InstallableFile const application = installableFiles.first();
- QVERIFY(application.isExecutable());
- QString expectedTargetFilePath
- = qbs::Internal::HostOsInfo::appendExecutableSuffix(QLatin1String("/tmp/usr/bin/installedApp"));
- QCOMPARE(application.targetFilePath(), expectedTargetFilePath);
- QCOMPARE(project.targetExecutable(product, installOptions), expectedTargetFilePath);
+ foreach (const qbs::InstallableFile &f,installableFiles) {
+ if (!f.sourceFilePath().endsWith("main.cpp")) {
+ QVERIFY(f.isExecutable());
+ QString expectedTargetFilePath = qbs::Internal::HostOsInfo
+ ::appendExecutableSuffix(QLatin1String("/tmp/usr/bin/installedApp"));
+ QCOMPARE(f.targetFilePath(), expectedTargetFilePath);
+ QCOMPARE(project.targetExecutable(product, installOptions), expectedTargetFilePath);
+ break;
+ }
+ }
setupParams.setProjectFilePath(QDir::cleanPath(QLatin1String(SRCDIR "/../blackbox/testdata"
"/recursive_wildcards/recursive_wildcards.qbs")));