diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py index a03be7eeb2a..2e9b0bebae3 100644 --- a/tests/system/shared/classes.py +++ b/tests/system/shared/classes.py @@ -38,6 +38,8 @@ class Targets: DESKTOP_531_DEFAULT, DESKTOP_541_GCC) = ALL_TARGETS + DESKTOP_561_DEFAULT = sum(ALL_TARGETS) + 1 + @staticmethod def desktopTargetClasses(): desktopTargets = (sum(Targets.ALL_TARGETS) & ~Targets.SIMULATOR & ~Targets.EMBEDDED_LINUX) @@ -69,6 +71,8 @@ class Targets: return "Desktop 531 default" elif target == Targets.DESKTOP_541_GCC: return "Desktop 541 GCC" + elif target == Targets.DESKTOP_561_DEFAULT: + return "Desktop 561 default" else: return None @@ -192,7 +196,10 @@ class Qt5Path: @staticmethod def __preCheckAndExtractQtVersionStr__(target): if target not in Targets.ALL_TARGETS: - raise Exception("Unexpected target '%s'" % str(target)) + # Ignore DESKTOP_561_DEFAULT which only delivers examples but not a kit yet. + # Remove the condition as soon as it is being used as a kit in tests. + if not target == Targets.DESKTOP_561_DEFAULT: + raise Exception("Unexpected target '%s'" % str(target)) matcher = re.match("^Desktop (5\\d{2}).*$", Targets.getStringForTarget(target)) if matcher is None: diff --git a/tests/system/suite_CCOM/tst_CCOM01/test.py b/tests/system/suite_CCOM/tst_CCOM01/test.py index 2891880c830..d5859c69b59 100755 --- a/tests/system/suite_CCOM/tst_CCOM01/test.py +++ b/tests/system/suite_CCOM/tst_CCOM01/test.py @@ -28,26 +28,20 @@ source("../../shared/qtcreator.py") # entry of test def main(): # prepare example project - sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/animation/basics/property-animation") - proFile = "propertyanimation.pro" + sourceExample = os.path.join(Qt5Path.examplesPath(Targets.DESKTOP_561_DEFAULT), + "quick", "animation") + proFile = "animation.pro" if not neededFilePresent(os.path.join(sourceExample, proFile)): return # copy example project to temp directory - templateDir = prepareTemplate(sourceExample) + templateDir = prepareTemplate(sourceExample, "/../shared") examplePath = os.path.join(templateDir, proFile) startApplication("qtcreator" + SettingsPath) if not startedWithoutPluginError(): return - # open example project - # qmlapplicationviewer of this example supports only Qt version < 5 - targets = (Targets.desktopTargetClasses() & ~Targets.DESKTOP_521_DEFAULT - & ~Targets.DESKTOP_531_DEFAULT & ~Targets.DESKTOP_541_GCC) + # open example project, supports only Qt 5 + targets = Targets.desktopTargetClasses() & ~Targets.DESKTOP_474_GCC & ~Targets.DESKTOP_480_DEFAULT checkedTargets = openQmakeProject(examplePath, targets) - if not replaceLine("propertyanimation.Sources.main\\.cpp", - "#include ", - "#include "): - return - invokeMenuItem("File", "Save All") # build and wait until finished - on all build configurations availableConfigs = iterateBuildConfigs(len(checkedTargets)) if not availableConfigs: diff --git a/tests/system/suite_CCOM/tst_CCOM02/test.py b/tests/system/suite_CCOM/tst_CCOM02/test.py index 8a3e38b84f4..2a59212706b 100755 --- a/tests/system/suite_CCOM/tst_CCOM02/test.py +++ b/tests/system/suite_CCOM/tst_CCOM02/test.py @@ -29,22 +29,22 @@ source("../../shared/qtcreator.py") # entry of test def main(): # prepare example project - sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/animation/basics/property-animation") - proFile = "propertyanimation.pro" + sourceExample = os.path.join(Qt5Path.examplesPath(Targets.DESKTOP_561_DEFAULT), + "quick", "animation") + proFile = "animation.pro" if not neededFilePresent(os.path.join(sourceExample, proFile)): return # copy example project to temp directory - templateDir = prepareTemplate(sourceExample) + templateDir = prepareTemplate(sourceExample, "/../shared") examplePath = os.path.join(templateDir, proFile) startApplication("qtcreator" + SettingsPath) if not startedWithoutPluginError(): return # open example project - targets = (Targets.desktopTargetClasses() & ~Targets.DESKTOP_521_DEFAULT - & ~Targets.DESKTOP_531_DEFAULT & ~Targets.DESKTOP_541_GCC) + targets = Targets.desktopTargetClasses() openQmakeProject(examplePath, targets) # create syntax error - openDocument("propertyanimation.QML.qml.property-animation\\.qml") + openDocument("animation.Resources.animation\\.qrc./animation.basics.property-animation\\.qml") if not appendToLine(waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget"), "Image {", "SyntaxError"): invokeMenuItem("File", "Exit") return