forked from qt-creator/qt-creator
- Rename ambiguously named "testsEnabled" property to "withPluginTests" and fix the wrong uses. - Move AutotestRunner out of main project file and into tests.qbs. - Move "withAutotests" property into qtc module. We cannot remove it from the main project file just yet, because some manual tests do not make use of QtcManualTest at the moment. - Do not remove the autotests from the project tree if autotests are disabled. Instead, just disable the products. Change-Id: I74a4cc717d9adbe53d37536b2565111e1617115b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
40 lines
1.3 KiB
QML
40 lines
1.3 KiB
QML
import qbs.FileInfo
|
|
|
|
Project {
|
|
name: "Tests"
|
|
references: [
|
|
"auto/auto.qbs",
|
|
"manual/manual.qbs",
|
|
"tools/qml-ast2dot/qml-ast2dot.qbs",
|
|
"unit/unit.qbs",
|
|
]
|
|
|
|
AutotestRunner {
|
|
Depends { name: "Qt.core" }
|
|
Depends { name: "qtc" }
|
|
environment: {
|
|
var env = base;
|
|
if (!qbs.hostOS.contains("windows") || !qbs.targetOS.contains("windows"))
|
|
return env;
|
|
var path = "";
|
|
for (var i = 0; i < env.length; ++i) {
|
|
if (env[i].startsWith("PATH=")) {
|
|
path = env[i].substring(5);
|
|
break;
|
|
}
|
|
}
|
|
var fullQtcInstallDir = FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix);
|
|
var fullLibInstallDir = FileInfo.joinPaths(fullQtcInstallDir, qtc.ide_library_path);
|
|
var fullPluginInstallDir = FileInfo.joinPaths(fullQtcInstallDir, qtc.ide_plugin_path);
|
|
path = Qt.core.binPath + ";" + fullLibInstallDir + ";" + fullPluginInstallDir
|
|
+ ";" + path;
|
|
var arrayElem = "PATH=" + path;
|
|
if (i < env.length)
|
|
env[i] = arrayElem;
|
|
else
|
|
env.push(arrayElem);
|
|
return env;
|
|
}
|
|
}
|
|
}
|