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

Squish: Fix determination of available targets



Change-Id: Iff01b44058dd9175aacfb0a0da96f35fb32383e7
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent 4fc9302c
......@@ -480,18 +480,19 @@ def __getSupportedPlatforms__(text, getAsStrings=False):
supports = text[text.find('Supported Platforms'):].split(":")[1].strip().split(" ")
result = []
if 'Desktop' in supports:
result.append(Targets.DESKTOP_474_GCC)
result.append(Targets.DESKTOP_480_GCC)
if version == None or version < "5.0":
result.append(Targets.DESKTOP_474_GCC)
result.append(Targets.DESKTOP_480_GCC)
if platform.system() in ("Linux", "Darwin"):
result.append(Targets.EMBEDDED_LINUX)
elif platform.system() in ('Windows', 'Microsoft'):
result.append(Targets.DESKTOP_480_MSVC2010)
result.append(Targets.DESKTOP_501_DEFAULT)
if platform.system() in ("Linux", "Darwin"):
result.append(Targets.EMBEDDED_LINUX)
elif platform.system() in ('Windows', 'Microsoft'):
result.append(Targets.DESKTOP_480_MSVC2010)
if 'MeeGo/Harmattan' in supports:
result.append(Targets.HARMATTAN)
if 'Maemo/Fremantle' in supports:
result.append(Targets.MAEMO5)
if not re.search("custom Qt Creator plugin", text):
if not re.search("custom Qt Creator plugin", text) and (version == None or version < "5.0"):
result.append(Targets.SIMULATOR)
elif 'Platform independent' in text:
# MAEMO5 and HARMATTAN could be wrong here - depends on having Madde plugin enabled or not
......
......@@ -101,7 +101,7 @@ def performTest(templateDir, qmlFile, isMaddeDisabled):
clickItem(templatesView, template, 5, 5, 0, Qt.LeftButton)
waitFor("textChanged", 2000)
text = waitForObject(":frame.templateDescription_QTextBrowser").plainText
displayedPlatforms, requiredVersion = __getSupportedPlatforms__(str(text), True)
displayedPlatforms = __getSupportedPlatforms__(str(text), True)[0]
clickButton(waitForObject("{text='Choose...' type='QPushButton' unnamed='1' visible='1'}"))
# don't check because project could exist
__createProjectSetNameAndPath__(os.path.expanduser("~"), 'untitled', False)
......@@ -120,19 +120,6 @@ def performTest(templateDir, qmlFile, isMaddeDisabled):
availableCheckboxes = filter(visibleCheckBoxExists, kits.keys())
# verification whether expected, found and configured match
for t in kits:
if requiredVersion:
if kits[t][1] < requiredVersion:
if t in availableCheckboxes:
test.fail("Kit '%s' found as checkbox, but required Qt version (%s) is "
"higher than configured Qt version (%s)!" % (t, requiredVersion,
str(kits[t][1])))
availableCheckboxes.remove(t)
else:
test.passes("Irrelevant kit '%s' not found on 'Kit Selection' page - "
"required Qt version is '%s', current Qt version is '%s'." %
(t, requiredVersion, str(kits[t][1])))
continue
found = False
if t in displayedPlatforms:
if t in availableCheckboxes:
test.passes("Found expected kit '%s' on 'Kit Selection' page." % t)
......
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