CQtDeployer/test.pri
Mozi ff9690b115 feat: leave an empty test target if WITHOUT_TESTS
Patch for 165b30e464e0e678689dbe398b6abb6761621c9d .

If we are on Android, add WITHOUT_TESTS to CONFIG.
If CONFIG contains WITHOUT_TESTS, "make test" should not perform any
  operation.
2021-02-09 12:41:24 +08:00

32 lines
793 B
Plaintext

unix:exec = $$PWD/UnitTests/build/release/UnitTests
win32:exec = $$PWD/UnitTests/build/release/UnitTests.exe
QT_DIR= $$[QT_HOST_BINS]
win32:QMAKE_BIN= $$QT_DIR/qmake.exe
contains(QMAKE_HOST.os, Linux):{
QMAKE_BIN= $$QT_DIR/qmake
}
DEPLOYER=cqtdeployer
win32:DEPLOYER=$$(cqtdeployer)
test.commands =
deployTest.commands = $$DEPLOYER -bin $$exec clear -qmake $$QMAKE_BIN -targetDir $$PWD/deployTests -libDir $$PWD -recursiveDepth 4
!contains(DEFINES, WITHOUT_TESTS) {
test.depends = deployTest
unix:test.commands = $$PWD/deployTests/UnitTests.sh -maxwarnings 100000
win32:test.commands = $$PWD/deployTests/UnitTests.exe -maxwarnings 100000 -o buildLog.log
}
contains(QMAKE_HOST.os, Linux):{
win32:test.commands =
}
QMAKE_EXTRA_TARGETS += \
deployTest \
test