c1b6fdd0d9
Change adds coin_ctest_runner.py which is used to pass test arguments for testcase. Results are stored to xml files, which are then parsed by COIN. Data that we are interested in, is injected to influx db. Task-number: COIN-643 Change-Id: Ib1c99fc8aacc6a6b5863d282f3435fe1cfdcd013 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
66 lines
1.9 KiB
YAML
66 lines
1.9 KiB
YAML
type: Group
|
|
instructions:
|
|
- 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
|