Commit 9c118fb8 authored by Robert Loehning's avatar Robert Loehning

Squish: Add function returning all available kits

Change-Id: I6699ad5c869dbbd413d0b1d113a169c2ec06511c
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent f78327a5
......@@ -37,12 +37,20 @@ class Targets:
DESKTOP_541_GCC,
DESKTOP_561_DEFAULT) = ALL_TARGETS
@staticmethod
def availableTargetClasses():
availableTargets = list(Targets.ALL_TARGETS)
if platform.system() in ('Windows', 'Microsoft'):
availableTargets.remove(Targets.EMBEDDED_LINUX)
elif platform.system() == 'Darwin':
availableTargets.remove(Targets.DESKTOP_541_GCC)
return availableTargets
@staticmethod
def desktopTargetClasses():
desktopTargets = list(Targets.ALL_TARGETS)
desktopTargets.remove(Targets.EMBEDDED_LINUX)
if platform.system() == 'Darwin':
desktopTargets.remove(Targets.DESKTOP_541_GCC)
desktopTargets = Targets.availableTargetClasses()
if Targets.EMBEDDED_LINUX in desktopTargets:
desktopTargets.remove(Targets.EMBEDDED_LINUX)
return desktopTargets
@staticmethod
......
......@@ -396,11 +396,7 @@ def __chooseTargets__(targets=[Targets.DESKTOP_474_GCC], availableTargets=None,
available = availableTargets
else:
# following targets depend on the build environment - added for further/later tests
available = list(Targets.ALL_TARGETS)
if platform.system() in ('Windows', 'Microsoft'):
available.remove(Targets.EMBEDDED_LINUX)
elif platform.system() == 'Darwin':
available.remove(Targets.DESKTOP_541_GCC)
available = Targets.availableTargetClasses()
checkedTargets = []
for current in available:
mustCheck = current in targets
......@@ -642,10 +638,7 @@ def __getSupportedPlatforms__(text, templateName, getAsStrings=False):
if platform.system() != 'Darwin':
result.append(Targets.DESKTOP_541_GCC)
elif 'Platform independent' in text:
result = list(Targets.ALL_TARGETS)
result.remove(Targets.EMBEDDED_LINUX)
if platform.system() == 'Darwin':
result.remove(Targets.DESKTOP_541_GCC)
result = Targets.desktopTargetClasses()
else:
test.warning("Returning None (__getSupportedPlatforms__())",
"Parsed text: '%s'" % text)
......
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