qbs build: Fix unittest project file

There were some subtle errors that lead to test failures.

Change-Id: Ibea24a8a45a47a5c3239da77bd4ed7ddca61ec57
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Christian Kandeler
2020-05-26 11:43:45 +02:00
parent a81b6b623e
commit c9672f4ffa

View File

@@ -3,7 +3,7 @@ import qbs.FileInfo
CppApplication { CppApplication {
condition: gtest.present && gmock.present condition: gtest.present && gmock.present
type: base.concat("autotest") type: base.concat(["autotest", "json_copy"])
consoleApplication: true consoleApplication: true
destinationDirectory: FileInfo.joinPaths(project.buildDirectory, destinationDirectory: FileInfo.joinPaths(project.buildDirectory,
FileInfo.relativePath(project.ide_source_tree, sourceDirectory)) FileInfo.relativePath(project.ide_source_tree, sourceDirectory))
@@ -34,8 +34,7 @@ CppApplication {
"CLANG_UNIT_TESTS", "CLANG_UNIT_TESTS",
"UNIT_TESTS", "UNIT_TESTS",
"DONT_CHECK_MESSAGE_COUNTER", "DONT_CHECK_MESSAGE_COUNTER",
'QTC_RESOURCE_DIR="' + FileInfo.joinPaths(project.sourceDirectory, "share", "qtcreator") 'QTC_RESOURCE_DIR="' + path + "/../../../share/qtcreator" + '"',
+ '"',
'TESTDATA_DIR="' + FileInfo.joinPaths(sourceDirectory, "data") + '"', 'TESTDATA_DIR="' + FileInfo.joinPaths(sourceDirectory, "data") + '"',
'ECHOSERVER="' + FileInfo.joinPaths(project.buildDirectory, "tests", "unit", 'ECHOSERVER="' + FileInfo.joinPaths(project.buildDirectory, "tests", "unit",
"echoserver", "echo") + '"', "echoserver", "echo") + '"',