From 63ffae3fa3a2627401878e7b948cb730118dc226 Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Fri, 26 Nov 2021 23:27:23 +0100 Subject: Introduce qt-testrunner.py Script that wraps Qt test execution in order to iron-out flakiness. Task-number: QTBUG-96353 Change-Id: Ie8ee780e3f4f8d086c080a7784f9f68fd1867be2 Reviewed-by: Daniel Smith --- .../cmake_run_ctest_enforce_exit_code.yaml | 17 ++++-------- .../cmake_setup_running_tests_env_vars.yaml | 32 ---------------------- 2 files changed, 6 insertions(+), 43 deletions(-) (limited to 'coin') diff --git a/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml b/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml index fecf283905..c2560be37e 100644 --- a/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml +++ b/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml @@ -10,19 +10,14 @@ instructions: equals_value: Windows - type: EnvironmentVariable variableName: TESTRUNNER - variableValue: "python3 {{.SourceDir}}/coin_ctest_runner.py" + variableValue: "{{.InstallDir}}/libexec/qt-testrunner.py --" disable_if: - condition: or - conditions: - - condition: property - property: host.os - equals_value: Windows - - condition: property - property: features - contains_value: AndroidTestRun + condition: property + property: host.os + equals_value: Windows - type: EnvironmentVariable variableName: TESTRUNNER - variableValue: "{{.SourceDir}}\\coin_ctest_runner.py" + variableValue: "{{.InstallDir}}\\bin\\qt-testrunner.py --" enable_if: condition: property property: host.os @@ -43,7 +38,7 @@ instructions: equals_value: Windows - type: EnvironmentVariable variableName: CTEST_ARGS - variableValue: "-V --rerun-failed --force-new-ctest-process --repeat until-pass:5" + variableValue: "-V" - type: AppendToEnvironmentVariable variableName: CTEST_ARGS variableValue: " --stop-on-failure" diff --git a/coin/instructions/cmake_setup_running_tests_env_vars.yaml b/coin/instructions/cmake_setup_running_tests_env_vars.yaml index c1a83eae07..b9387d74c6 100644 --- a/coin/instructions/cmake_setup_running_tests_env_vars.yaml +++ b/coin/instructions/cmake_setup_running_tests_env_vars.yaml @@ -5,38 +5,6 @@ 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 -- cgit v1.2.3