diff options
author | Christian Stenger <christian.stenger@qt.io> | 2023-07-25 09:27:25 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2023-07-27 10:37:50 +0000 |
commit | 4a8c08a349638bc3106e341fec5e4d308102a152 (patch) | |
tree | 8ac9bf2215dd50f574147aeb0cbce91bb15a7834 | |
parent | 488f1b3d11f29fa8b5ac09d454e7372c33aa4318 (diff) |
SquishTests: Skip too old Qt on Windows
When creating a command line project from wizard we end up
with code that is not compilable on Windows when using too
old Qt versions. Explicitly do not use the older Qt versions
as this fails to build and the whole tests would need to get
adapted to handle this appropriate instead.
Change-Id: Ia8a253a0c5d8d20ea181dd33dc8d31cb83cb31c3
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
-rw-r--r-- | tests/system/shared/project.py | 7 | ||||
-rw-r--r-- | tests/system/suite_debugger/tst_cli_output_console/test.py | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index d1e44102bc..b39ef8060e 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -248,11 +248,16 @@ def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="<N # param path specifies where to create the project # param projectName is the name for the new project # param checks turns tests in the function on if set to True -def createProject_Qt_Console(path, projectName, checks = True, buildSystem = None): +def createProject_Qt_Console(path, projectName, checks = True, buildSystem = None, targets=[]): available = __createProjectOrFileSelectType__(" Application (Qt)", "Qt Console Application") __createProjectSetNameAndPath__(path, projectName, checks) buildSystem = __handleBuildSystem__(buildSystem) __createProjectHandleTranslationSelection__() + if targets: + available = set(targets).intersection(available) + if len(available) < len(targets): + test.warning("Could not use all desired targets.", + "%s vs %s" % (str(available), str(targets))) __selectQtVersionDesktop__(buildSystem, checks, available) expectedFiles = [] diff --git a/tests/system/suite_debugger/tst_cli_output_console/test.py b/tests/system/suite_debugger/tst_cli_output_console/test.py index 9c7235cddb..aed9089fed 100644 --- a/tests/system/suite_debugger/tst_cli_output_console/test.py +++ b/tests/system/suite_debugger/tst_cli_output_console/test.py @@ -12,7 +12,11 @@ def main(): startQC() if not startedWithoutPluginError(): return - createProject_Qt_Console(tempDir(), project) + targets = [] + if platform.system() in ('Microsoft', 'Windows'): + # Qt5.10 has constructs that do not work on Win because of limitation to older C++ + targets = [Targets.DESKTOP_5_14_1_DEFAULT, Targets.DESKTOP_6_2_4] + createProject_Qt_Console(tempDir(), project, targets=targets) mainEditor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget") replaceEditorContent(mainEditor, "") |