80705298ca
Add infrastructure to build cmake auto tests in the CI when targeting iOS. Currently the are only CI instructions for qtbase. More work is needed to make it work for other repos. With this change, we will build a single Widgets application targeting the iOS simulator. We can't target the device SDK in the CI because signing fails due to a missing signing certificate and provisioning profile. The Coin instructions will now set a QT_BUILD_ENVIRONMENT=ci env var whose value will be checked in _qt_internal_test_expect_pass, to ensure we build for the simulator SDK when using a universal Qt. Without this, xcodebuild will try to build with the device SDK and fail to build the project. Pick-to: 6.2 Task-number: QTBUG-95839 Change-Id: Ib39c9527b107b2004746ccbdc9d9d1d658f88c76 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
68 lines
2.1 KiB
YAML
68 lines
2.1 KiB
YAML
type: Group
|
|
instructions:
|
|
# Informs qtestblacklist.cpp that tests are run in the CI.
|
|
# A related QT_BUILD_ENVIRONMENT env var is set during an integration's build phase.
|
|
- type: EnvironmentVariable
|
|
variableName: QTEST_ENVIRONMENT
|
|
variableValue: "ci"
|
|
- type: WriteFile
|
|
fileContents: |
|
|
#!/usr/bin/python3
|
|
import subprocess
|
|
import calendar
|
|
import datetime
|
|
import time
|
|
import sys
|
|
import os
|
|
import re
|
|
from os.path import expanduser
|
|
home = expanduser("~")
|
|
|
|
file=os.path.basename(sys.argv[1])
|
|
timestamp = str(round(time.time() * 1000))
|
|
results_file = home + "/work/testresults/" + file +"-" + timestamp + ".xml,xml"
|
|
testargs = ["-o", results_file, "-o", "-,txt"]
|
|
if re.search("testlib.selftests.tst_selftests", sys.argv[1]):
|
|
testargs = []
|
|
exit(subprocess.call([sys.argv[1]] + testargs))
|
|
filename: "{{.SourceDir}}/coin_ctest_runner.py"
|
|
fileMode: 755
|
|
- type: ExecuteCommand
|
|
command: "chmod 755 {{.SourceDir}}/coin_ctest_runner.py"
|
|
maxTimeInSeconds: 10
|
|
maxTimeBetweenOutput: 10
|
|
userMessageOnFailure: >
|
|
Failed to change file permission.
|
|
disable_if:
|
|
condition: property
|
|
property: host.os
|
|
equals_value: Windows
|
|
- type: Group
|
|
instructions:
|
|
- type: EnvironmentVariable
|
|
variableName: TESTS_ENV_PREFIX
|
|
variableValue: "{{.Env.ENV_PREFIX}}"
|
|
enable_if:
|
|
condition: and
|
|
conditions:
|
|
- condition: property
|
|
property: host.os
|
|
equals_property: target.os
|
|
- condition: property
|
|
property: target.osVersion
|
|
not_equals_value: QEMU
|
|
- type: Group
|
|
instructions:
|
|
- type: EnvironmentVariable
|
|
variableName: TESTS_ENV_PREFIX
|
|
variableValue: "{{.Env.TARGET_ENV_PREFIX}}"
|
|
disable_if:
|
|
condition: and
|
|
conditions:
|
|
- condition: property
|
|
property: host.os
|
|
equals_property: target.os
|
|
- condition: property
|
|
property: target.osVersion
|
|
not_equals_value: QEMU
|