Commit b0906160 authored by Christian Stenger's avatar Christian Stenger
Browse files

Squish: Fix tests for disabled Madde Plugin

Part 2: Fixing evaluation of configured kits depending on available
Qt versions as well as determining supported platforms.

Additionally enable verifications for Plain C and Plain C++ projects
as well.

Change-Id: I1f92b44c6771dfc9353b911fdb1ec654c5cc591b
Reviewed-by: default avatarRobert Loehning <>
parent dae21983
......@@ -441,7 +441,6 @@ def __getSupportedPlatforms__(text, getAsStrings=False):
if 'Supported Platforms' in text:
supports = text[text.find('Supported Platforms'):].split(":")[1].strip().split(" ")
result = []
addSimulator = False
if 'Desktop' in supports:
if platform.system() in ("Linux", "Darwin"):
......@@ -450,13 +449,12 @@ def __getSupportedPlatforms__(text, getAsStrings=False):
if 'MeeGo/Harmattan' in supports:
addSimulator = True
if 'Maemo/Fremantle' in supports:
addSimulator = True
if len(result) == 0 or addSimulator:
if not"custom Qt Creator plugin", text):
elif 'Platform independent' in text:
# MAEMO5 and HARMATTAN could be wrong here - depends on having Madde plugin enabled or not
result = [QtQuickConstants.Targets.DESKTOP_474_GCC, QtQuickConstants.Targets.MAEMO5,
QtQuickConstants.Targets.SIMULATOR, QtQuickConstants.Targets.HARMATTAN]
if platform.system() in ('Windows', 'Microsoft'):
......@@ -285,7 +285,7 @@ def __checkParentAccess__(filePath):
# this function checks for all configured Qt versions inside
# options dialog and returns a dict holding the kits as keys
# and a list of information of its configured Qt
def getConfiguredKits():
def getConfiguredKits(isMaddedDisabled=True):
def __retrieveQtVersionName__(target, version):
treeWidget = waitForObject(":QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget")
return treeWidget.currentItem().text(0)
......@@ -305,7 +305,9 @@ def getConfiguredKits():
iterateKits(True, True, __setQtVersionForKit__, kitsWithQtVersionName)
# merge defined target names with their configured Qt versions and devices
for kit,qtVersion in kitsWithQtVersionName.iteritems():
if qtVersion in qtVersionNames:
if isMaddedDisabled and kit in ('Fremantle', 'Harmattan') and qtVersion == 'None':
test.log("Found Kit '%s' with unassigned Qt version (disabled Madde plugin)" % kit)
elif qtVersion in qtVersionNames:
result[kit] = targetsQtVersions[qtVersionNames.index(qtVersion)].items()[0]
else:"Qt version '%s' for kit '%s' can't be found in qtVersionNames."
......@@ -21,12 +21,19 @@ def main():
catModel = categoriesView.model()
projects = catModel.index(0, 0)"Projects", str(
comboBox = waitForObject("{name='comboBox' type='QComboBox' visible='1' "
"window=':New_Core::Internal::NewDialog'}"), "All Templates")
comboBox = findObject("{name='comboBox' type='QComboBox' visible='1' "
targets = zip(*kits.values())[0]
if (QtQuickConstants.getStringForTarget(QtQuickConstants.Targets.MAEMO5) not in targets
and QtQuickConstants.getStringForTarget(QtQuickConstants.Targets.HARMATTAN) not in targets):, "Desktop Templates")
test.verify(not comboBox.enabled, "Verifying whether combobox is disabled.")
else:, "All Templates")
test.verify(comboBox.enabled, "Verifying whether combobox is enabled.")
for category in [item.replace(".", "\\.") for item in dumpItems(catModel, projects)]:
# skip non-configurable
if "Import" in category or "Non-Qt" in category:
if "Import" in category:
clickItem(categoriesView, "Projects." + category, 5, 5, 0, Qt.LeftButton)
templatesView = waitForObject("{name='templatesView' type='QListView' visible='1'}")
......@@ -34,7 +41,7 @@ def main():
for template in dumpItems(templatesView.model(), templatesView.rootIndex()):
template = template.replace(".", "\\.")
# skip non-configurable
if "Qt Quick 1 UI" in template or "Plain C" in template:
if template in ("Qt Quick 1 UI", "Qt Quick 2 UI") or "(CMake Build)" in template:
clickButton(waitForObject("{text='Cancel' type='QPushButton' unnamed='1' visible='1'}"))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment