Warning, /sdk/cutehmi/qbs/imports/cutehmi/Test.qbs is written in an unsupported language. File is not indexed.
0001 import qbs 0002 0003 import "CommonProduct.qbs" as CommonProduct 0004 0005 /** 0006 Test product. 0007 */ 0008 CommonProduct { 0009 type: project.buildBinaries ? ["application", "autotest"] : [] 0010 0011 name: testNamePrefix + "." + testName 0012 0013 cutehmiType: "test" 0014 0015 baseName: name 0016 0017 //<qbs-imports-cutehmi-2.workaround target="Qbs" cause="bug"> 0018 // Even tho' 'type' property can conditionaly specify "autotest", when condition involves complex evaluation of module 0019 // parameters such as 'cutehmi.product.enabled' (probably causing some re-evaluation) AutotestRunner will not conform to the 0020 // final results, but rather stick to some initial results (branch that specifies "autotest"). Using 'condition' seems to 0021 // resolve the issue. No product should depend on a test product, so no product should be affected by 0022 // "qbs-imports-cutehmi-1.workaround". 0023 condition: project.buildTests && cutehmi.product.enabled 0024 //</qbs-imports-cutehmi-2.workaround> 0025 0026 property string testedProduct 0027 0028 property string testName 0029 0030 property string testNamePrefix: testedProduct 0031 0032 Depends { name: "cpp" } 0033 Properties { 0034 condition: qbs.targetOS.contains("linux") 0035 cpp.linkerFlags: "-rpath=$ORIGIN" 0036 } 0037 cpp.defines: base.concat("QUICK_TEST_SOURCE_DIR=\"" + sourceDirectory + "\"") 0038 cpp.includePaths: [ 0039 cutehmi.dirs.externalIncludeDir, 0040 product.sourceDirectory + "/" + cutehmi.conventions.functions.includesSubdir(product.name) 0041 ] 0042 cpp.libraryPaths: [cutehmi.dirs.externalLibDir] 0043 0044 Depends { name: "autotest" } 0045 autotest.arguments: ["-o", name + ".xunit.xml,xunitxml"] 0046 autotest.allowFailure: true 0047 0048 Depends { name: "Qt.testlib" } 0049 0050 Depends { name: "Qt.qmltest" } 0051 0052 Depends { name: "cutehmi.cpp" } 0053 0054 Depends { name: "cutehmi.dirs" } 0055 0056 Group { 0057 name: "Application" 0058 fileTagsFilter: "application" 0059 qbs.install: true 0060 qbs.installDir: cutehmi.dirs.testsInstallSubdir 0061 } 0062 0063 Group { 0064 name: "Translations" 0065 fileTagsFilter: ["qm"] 0066 qbs.install: true 0067 qbs.installDir: cutehmi.dirs.translationsInstallSubdir 0068 } 0069 } 0070 0071 //(c)C: Copyright © 2018-2024, Michał Policht <michal@policht.pl>. All rights reserved. 0072 //(c)C: SPDX-License-Identifier: LGPL-3.0-or-later OR MIT 0073 //(c)C: This file is a part of CuteHMI. 0074 //(c)C: CuteHMI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 0075 //(c)C: CuteHMI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 0076 //(c)C: You should have received a copy of the GNU Lesser General Public License along with CuteHMI. If not, see <https://www.gnu.org/licenses/>. 0077 //(c)C: Additionally, this file is licensed under terms of MIT license as expressed below. 0078 //(c)C: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 0079 //(c)C: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 0080 //(c)C: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.