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.
This commit is contained in:
Mozi 2021-02-09 12:27:09 +08:00
parent 165b30e464
commit ff9690b115
2 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ lessThan(QT_MAJOR_VERSION, 6):lessThan(QT_MINOR_VERSION, 12) {
warning("Tests are only enabled on Qt 5.12.0 or later version. You are using $$[QT_VERSION].")
DEFINES += WITHOUT_TESTS
}
android: DEFINES += WITHOUT_TESTS
!android {
SUBDIRS += QuasarAppLib \

View File

@ -13,7 +13,7 @@ win32:DEPLOYER=$$(cqtdeployer)
test.commands =
deployTest.commands = $$DEPLOYER -bin $$exec clear -qmake $$QMAKE_BIN -targetDir $$PWD/deployTests -libDir $$PWD -recursiveDepth 4
!android {
!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