summaryrefslogtreecommitdiff
path: root/tests/auto/api
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-05-20 13:43:42 +0200
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-05-21 09:49:31 +0000
commit3a1280c5b51488599c98e6c0fabef41464dd857f (patch)
treeae7db821df45c229790938cc77f0676c3bf4d4de /tests/auto/api
parentc004522ff281ccc1fbb16e7a8f60d9c1e0a90be2 (diff)
downloadqbs-3a1280c5b51488599c98e6c0fabef41464dd857f.tar.gz
Clean up directories created as part of dry run builds.
We always need to create a lock file, which in turn can cause directories to be created. Remove these afterwards if no other files were created within them. Task-number: QTCREATORBUG-14482 Change-Id: If990614fbe53444addb45aa6d9490e9128c354d2 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'tests/auto/api')
-rw-r--r--tests/auto/api/tst_api.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/auto/api/tst_api.cpp b/tests/auto/api/tst_api.cpp
index 657ffc38d..1a0aa2ed1 100644
--- a/tests/auto/api/tst_api.cpp
+++ b/tests/auto/api/tst_api.cpp
@@ -342,9 +342,8 @@ void TestApi::buildProjectDryRun()
const qbs::ErrorInfo errorInfo
= doBuildProject(projectSubDir + "/project.qbs", 0, 0, 0, options);
VERIFY_NO_ERROR(errorInfo);
- const QStringList &buildDirContents
- = QDir(relativeBuildDir()).entryList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs);
- QVERIFY2(buildDirContents.isEmpty(), qPrintable(buildDirContents.join(" ")));
+ QVERIFY2(!QFileInfo::exists(relativeBuildDir()), qPrintable(QDir(relativeBuildDir())
+ .entryList(QDir::NoDotAndDotDot | QDir::AllEntries | QDir::System).join(", ")));
}
void TestApi::buildProjectDryRun_data()