summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2016-06-01 18:22:05 +0200
committerRobert Loehning <robert.loehning@qt.io>2016-07-15 12:25:15 +0000
commit9ac9211d64ac171ee0c173547dc8737d22df7e8b (patch)
treeb9d0725450f521c74127fc7487db0f912f44f54f /tests
parentcc18dc3cd8ecad145ed5456ddaeae7062f271981 (diff)
downloadqt-creator-9ac9211d64ac171ee0c173547dc8737d22df7e8b.tar.gz
Squish: Use examples from Qt 5 in suite_CCOM
Task-number: QTCREATORBUG-15469 Change-Id: I147c0ff6d402b97a1737a4bb57697c88ac7838be Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/system/shared/classes.py9
-rwxr-xr-xtests/system/suite_CCOM/tst_CCOM01/test.py18
-rwxr-xr-xtests/system/suite_CCOM/tst_CCOM02/test.py12
3 files changed, 20 insertions, 19 deletions
diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py
index a03be7eeb2..2e9b0bebae 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 2891880c83..d5859c69b5 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 <QtGui/QApplication>",
- "#include <QApplication>"):
- 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 8a3e38b84f..2a59212706 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