aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2016-12-10 16:35:06 -0800
committerJake Petroules <jake.petroules@qt.io>2016-12-12 16:30:09 +0000
commit36502ab5d613e49fc3c393c9e41db9ef22c98041 (patch)
tree6bbbe94c215c43859d2ec65937d8d5df8f1b8918
parentfed086a360dd9d320f4c786da95c3d10b4a5fa4f (diff)
Fix unnecessary output noise and absolute path assertions in tests
Change-Id: I59e7efa8d91ade54582cfffb39226724e22a4f69 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--src/lib/corelib/language/tst_language.cpp2
-rw-r--r--tests/auto/api/tst_api.cpp3
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp1
3 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/corelib/language/tst_language.cpp b/src/lib/corelib/language/tst_language.cpp
index 9823a8d34..65b0713ea 100644
--- a/src/lib/corelib/language/tst_language.cpp
+++ b/src/lib/corelib/language/tst_language.cpp
@@ -1031,6 +1031,7 @@ public:
void TestLanguage::itemPrototype()
{
FileContextPtr fileContext = FileContext::create();
+ fileContext->setFilePath("/dev/null");
JSSourceValueCreator sourceValueCreator(fileContext);
ItemPool pool;
Item *proto = Item::create(&pool);
@@ -1053,6 +1054,7 @@ void TestLanguage::itemPrototype()
void TestLanguage::itemScope()
{
FileContextPtr fileContext = FileContext::create();
+ fileContext->setFilePath("/dev/null");
JSSourceValueCreator sourceValueCreator(fileContext);
ItemPool pool;
Item *scope1 = Item::create(&pool);
diff --git a/tests/auto/api/tst_api.cpp b/tests/auto/api/tst_api.cpp
index b0905ea46..cbc0a5237 100644
--- a/tests/auto/api/tst_api.cpp
+++ b/tests/auto/api/tst_api.cpp
@@ -1230,7 +1230,8 @@ void TestApi::inheritQbsSearchPaths()
qPrintable(errorInfo.toString()));
QVariantMap overriddenValues;
- overriddenValues.insert("project.qbsSearchPaths", QStringList() << "subdir");
+ overriddenValues.insert("project.qbsSearchPaths",
+ QStringList() << m_workingDataDir + "/inherit-qbs-search-paths/subdir");
errorInfo = doBuildProject(projectFilePath, 0, 0, 0, qbs::BuildOptions(), overriddenValues);
VERIFY_NO_ERROR(errorInfo);
}
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 79f5105ec..15e28a5c1 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -287,6 +287,7 @@ void TestBlackbox::alwaysRun()
rmDirR(relativeBuildDir());
QbsRunParameters params("build", QStringList() << "-f" << projectFile);
if (projectFile.contains("transformer")) {
+ params.expectFailure = true;
QVERIFY(runQbs(params) != 0);
QVERIFY2(m_qbsStderr.contains("removed"), m_qbsStderr.constData());
return;