diff options
author | Christian Stenger <christian.stenger@qt.io> | 2022-02-01 14:58:47 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2022-02-02 11:09:12 +0000 |
commit | 40caa8a4ba97ce7677cb26a7e4d4176baad99db6 (patch) | |
tree | 09403014b5f5c3fa2893ef0ddd228fde33ff68f4 | |
parent | f95636a8203c7b6de6f166f9e0a0604f08bce239 (diff) |
Squish: Make presence of Qt4 optional
It is hard to build Qt4 nowadays. Any machine set up
today won't be able to build it without hazzle.
So, make it optional inside the Squish tests to avoid
fails and fatals. Use a different available Qt instead.
Change-Id: I151d809f4fada8047a30940a183f913af2a1a691
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
-rw-r--r-- | tests/system/README | 1 | ||||
-rw-r--r-- | tests/system/shared/classes.py | 2 | ||||
-rw-r--r-- | tests/system/shared/project.py | 8 | ||||
-rw-r--r-- | tests/system/shared/qtcreator.py | 2 | ||||
-rw-r--r-- | tests/system/suite_CSUP/tst_CSUP03/test.py | 6 | ||||
-rw-r--r-- | tests/system/suite_HELP/tst_HELP04/test.py | 3 | ||||
-rw-r--r-- | tests/system/suite_general/tst_build_speedcrunch/test.py | 5 | ||||
-rw-r--r-- | tests/system/suite_general/tst_openqt_creator/test.py | 5 |
8 files changed, 25 insertions, 7 deletions
diff --git a/tests/system/README b/tests/system/README index 05fe472d5a..61847485fb 100644 --- a/tests/system/README +++ b/tests/system/README @@ -5,6 +5,7 @@ Squish tests inside this folder have several prerequisites to get them running. First - and most important - you have to own a valid Squish license. At least Squish 6.0 is required. Second - some of the test suites/test cases expect a build of Qt 4.8.7 to be available: +[ this is optional and if Qt4 is not available some Qt5 will be tried to use instead ] 1. Download the source code from: * Windows: https://download.qt.io/archive/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.zip * Other: https://download.qt.io/archive/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py index a96a7e2d6e..fefee33b53 100644 --- a/tests/system/shared/classes.py +++ b/tests/system/shared/classes.py @@ -52,6 +52,8 @@ class Targets: availableTargets.remove(Targets.EMBEDDED_LINUX) elif platform.system() == 'Darwin': availableTargets.remove(Targets.DESKTOP_5_4_1_GCC) + if not qt4Available: + availableTargets.remove(Targets.DESKTOP_4_8_7_DEFAULT) return availableTargets @staticmethod diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index e8ee09bda9..04ea8220ac 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -69,7 +69,10 @@ def openCmakeProject(projectPath, buildDir): invokeMenuItem("File", "Open File or Project...") selectFromFileDialog(projectPath) __chooseTargets__([]) # uncheck all - __chooseTargets__([Targets.DESKTOP_4_8_7_DEFAULT], additionalFunc=additionalFunction) + targetToChoose = Targets.DESKTOP_4_8_7_DEFAULT # FIXME make the intended target a parameter + if not qt4Available: + targetToChoose = Targets.DESKTOP_5_14_1_DEFAULT + __chooseTargets__([targetToChoose], additionalFunc=additionalFunction) clickButton(waitForObject(":Qt Creator.Configure Project_QPushButton")) return True @@ -511,7 +514,8 @@ def __getSupportedPlatforms__(text, templateName, getAsStrings=False): result = set() if 'Desktop' in supports: if (version == None or version < "5.0") and not templateName.startswith("Qt Quick 2"): - result.add(Targets.DESKTOP_4_8_7_DEFAULT) + if qt4Available: + result.add(Targets.DESKTOP_4_8_7_DEFAULT) if platform.system() in ("Linux", "Darwin"): result.add(Targets.EMBEDDED_LINUX) result = result.union(set([Targets.DESKTOP_5_10_1_DEFAULT, Targets.DESKTOP_5_14_1_DEFAULT])) diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index 0618ce273d..f7ea2a2c60 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -339,6 +339,8 @@ elif platform.system() == 'Darwin': else: origSettingsDir = os.path.join(origSettingsDir, "unix") +qt4Available = os.path.exists(qt4Path) + srcPath = os.getenv("SYSTEST_SRCPATH", os.path.expanduser(os.path.join("~", "squish-data"))) # the following only doesn't work if the test ends in an exception diff --git a/tests/system/suite_CSUP/tst_CSUP03/test.py b/tests/system/suite_CSUP/tst_CSUP03/test.py index 53b532c05d..a20ac19ea4 100644 --- a/tests/system/suite_CSUP/tst_CSUP03/test.py +++ b/tests/system/suite_CSUP/tst_CSUP03/test.py @@ -78,8 +78,10 @@ def main(): continue if not startCreatorVerifyingClang(useClang): continue - projectName = createNewNonQtProject(tempDir(), "project-csup03", - [Targets.DESKTOP_4_8_7_DEFAULT]) + targetToChoose = Targets.DESKTOP_4_8_7_DEFAULT + if not qt4Available: + targetToChoose = Targets.DESKTOP_5_14_1_DEFAULT + projectName = createNewNonQtProject(tempDir(), "project-csup03", [targetToChoose]) checkCodeModelSettings(useClang) openDocument("%s.Sources.main\\.cpp" % projectName) editor = getEditorForFileSuffix("main.cpp") diff --git a/tests/system/suite_HELP/tst_HELP04/test.py b/tests/system/suite_HELP/tst_HELP04/test.py index 18e3ee4563..83941679b9 100644 --- a/tests/system/suite_HELP/tst_HELP04/test.py +++ b/tests/system/suite_HELP/tst_HELP04/test.py @@ -69,7 +69,8 @@ def main(): startQC() if not startedWithoutPluginError(): return - addHelpDocumentation([os.path.join(qt4Path, "doc", "qch", "qt.qch")]) + if qt4Available: + addHelpDocumentation([os.path.join(qt4Path, "doc", "qch", "qt.qch")]) # switch to help mode switchViewTo(ViewConstants.HELP) # verify that search widget is accessible diff --git a/tests/system/suite_general/tst_build_speedcrunch/test.py b/tests/system/suite_general/tst_build_speedcrunch/test.py index 8ba749b168..e98a9b0e9a 100644 --- a/tests/system/suite_general/tst_build_speedcrunch/test.py +++ b/tests/system/suite_general/tst_build_speedcrunch/test.py @@ -41,7 +41,10 @@ def main(): startQC() if not startedWithoutPluginError(): return - openQmakeProject(SpeedCrunchPath, [Targets.DESKTOP_4_8_7_DEFAULT]) + targetToChoose = Targets.DESKTOP_4_8_7_DEFAULT + if not qt4Available: + targetToChoose = Targets.DESKTOP_5_14_1_DEFAULT + openQmakeProject(SpeedCrunchPath, [targetToChoose]) waitForProjectParsing() fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton") diff --git a/tests/system/suite_general/tst_openqt_creator/test.py b/tests/system/suite_general/tst_openqt_creator/test.py index ad1f4b52a2..6ff0bfb345 100644 --- a/tests/system/suite_general/tst_openqt_creator/test.py +++ b/tests/system/suite_general/tst_openqt_creator/test.py @@ -36,7 +36,10 @@ def main(): return runButton = findObject(':*Qt Creator.Run_Core::Internal::FancyToolButton') - openQmakeProject(pathSpeedcrunch, [Targets.DESKTOP_4_8_7_DEFAULT]) + targetToChoose = Targets.DESKTOP_4_8_7_DEFAULT + if not qt4Available: + targetToChoose = Targets.DESKTOP_5_14_1_DEFAULT + openQmakeProject(pathSpeedcrunch, [targetToChoose]) # Wait for parsing to complete waitFor("runButton.enabled", 30000) # Starting before opening, because this is where Creator froze (QTCREATORBUG-10733) |