From 4142c7a911f59a135911cce51e0179625e06595f Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 14 Jan 2014 17:17:25 +0100 Subject: 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 Reviewed-by: Christian Kandeler --- tests/auto/api/tst_api.cpp | 16 ++++++++++------ 1 file 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 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"))); -- cgit v1.2.3