diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-11-06 22:22:42 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-11-09 03:10:49 +0000 |
commit | 2530d46c5a8a9dfba6e02b48a376545cdaf7a361 (patch) | |
tree | 77a28150bb48119675311d07de46a5b5381f1b2d /tests/tests.qbs | |
parent | 842740d6ef482512df326e99c0d365b90ca503b0 (diff) |
Allow disabling pieces of the Qbs project by category
This allows the "resources build" to not rely on a valid Qt profile.
Task-number: QBS-1238
Change-Id: I1c743a95993099250da714c794b6e0ac16133609
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/tests.qbs')
-rw-r--r-- | tests/tests.qbs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/tests.qbs b/tests/tests.qbs new file mode 100644 index 000000000..77efb82a2 --- /dev/null +++ b/tests/tests.qbs @@ -0,0 +1,41 @@ +import qbs + +Project { + references: [ + "auto/auto.qbs", + "benchmarker/benchmarker.qbs", + "fuzzy-test/fuzzy-test.qbs", + ] + + AutotestRunner { + Depends { name: "Qt.core" } + Depends { name: "qbs resources" } + Depends { name: "qbs_cpp_scanner" } + Depends { name: "qbs_qt_scanner" } + arguments: project.autotestArguments + wrapper: project.autotestWrapper + environment: { + var env = base; + if (qbs.hostOS.contains("windows") && qbs.targetOS.contains("windows")) { + var path = ""; + for (var i = 0; i < env.length; ++i) { + if (env[i].startsWith("PATH=")) { + path = env[i].substring(5); + break; + } + } + path = Qt.core.binPath + ";" + path; + var arrayElem = "PATH=" + path; + if (i < env.length) + env[i] = arrayElem; + else + env.push(arrayElem); + } + if (qbs.hostOS.contains("darwin") && qbs.targetOS.contains("darwin")) { + env.push("DYLD_FRAMEWORK_PATH=" + Qt.core.libPath); + env.push("DYLD_LIBRARY_PATH=" + Qt.core.libPath); + } + return env; + } + } +} |