aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2018-08-08 17:44:27 +0200
committerRobert Loehning <robert.loehning@qt.io>2018-08-10 09:35:17 +0000
commit94fb8efab1d8579dd6fc2f52040ea77a74d521f8 (patch)
tree392ef05ad259edc8939059e1b22ba3f31d979b17 /tests
parent2b877246cae7704f521689d66d5d825e84a3d1bf (diff)
Squish: Remove old default target parameters
Change-Id: I72153c535ae0670cb4bfa061f34659bc7faee001 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/system/shared/project.py29
-rw-r--r--tests/system/suite_APTW/tst_APTW03/test.py8
-rw-r--r--tests/system/suite_CSUP/tst_CSUP03/test.py3
3 files changed, 12 insertions, 28 deletions
diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py
index 922e5befe9..a8305e11a4 100644
--- a/tests/system/shared/project.py
+++ b/tests/system/shared/project.py
@@ -342,26 +342,15 @@ def createEmptyQtProject(workingDir=None, projectName=None, targets=Targets.desk
__createProjectHandleLastPage__()
return projectName
-def createNewNonQtProject(workingDir=None, projectName=None, target=[Targets.DESKTOP_4_8_7_DEFAULT],
- plainC=False, cmake=False, qbs=False):
+def createNewNonQtProject(workingDir, projectName, target, plainC=False, buildSystem="qmake"):
if plainC:
template = "Plain C Application"
else:
template = "Plain C++ Application"
available = __createProjectOrFileSelectType__(" Non-Qt Project", template)
- if workingDir == None:
- workingDir = tempDir()
projectName = __createProjectSetNameAndPath__(workingDir, projectName)
- buildSystem = "qmake"
- if qbs:
- buildSystem = "Qbs"
- if cmake:
- test.warning("Unsupported combination, at least one of parameters cmake and qbs must "
- "be False, ignoring the value of cmake")
- elif cmake:
- buildSystem = "CMake"
selectFromCombo("{name='BuildSystem' type='QComboBox' visible='1'}", buildSystem)
clickButton(waitForObject(":Next_QPushButton"))
@@ -370,9 +359,8 @@ def createNewNonQtProject(workingDir=None, projectName=None, target=[Targets.DES
__createProjectHandleLastPage__()
return projectName
-def createNewCPPLib(projectDir = None, projectName = None, className = None, fromWelcome = False,
- target = [Targets.DESKTOP_4_8_7_DEFAULT], isStatic = False, modules = ["QtCore"]):
- available = __createProjectOrFileSelectType__(" Library", "C++ Library", fromWelcome, True)
+def createNewCPPLib(projectDir, projectName, className, target, isStatic):
+ available = __createProjectOrFileSelectType__(" Library", "C++ Library", False, True)
if isStatic:
libType = LibType.STATIC
else:
@@ -383,16 +371,13 @@ def createNewCPPLib(projectDir = None, projectName = None, className = None, fro
__chooseTargets__(target, available)
snooze(1)
clickButton(waitForObject(":Next_QPushButton"))
- __createProjectHandleModuleSelection__(modules)
+ __createProjectHandleModuleSelection__(["QtCore"])
className = __createProjectHandleClassInformation__(className)
__createProjectHandleLastPage__()
return projectName, className
-def createNewQtPlugin(projectDir=None, projectName=None, className=None, fromWelcome=False,
- target=[Targets.DESKTOP_4_8_7_DEFAULT], baseClass="QGenericPlugin"):
- available = __createProjectOrFileSelectType__(" Library", "C++ Library", fromWelcome, True)
- if projectDir == None:
- projectDir = tempDir()
+def createNewQtPlugin(projectDir, projectName, className, target, baseClass="QGenericPlugin"):
+ available = __createProjectOrFileSelectType__(" Library", "C++ Library", False, True)
projectName = __createProjectSetNameAndPath__(projectDir, projectName, False, LibType.QT_PLUGIN)
__chooseTargets__(target, available)
snooze(1)
@@ -407,7 +392,7 @@ def createNewQtPlugin(projectDir=None, projectName=None, className=None, fromWel
# parameter additionalFunc function to be executed inside the detailed view of each chosen kit
# if present, 'Details' button will be clicked, function will be executed,
# 'Details' button will be clicked again
-def __chooseTargets__(targets=[Targets.DESKTOP_4_8_7_DEFAULT], availableTargets=None, additionalFunc=None):
+def __chooseTargets__(targets, availableTargets=None, additionalFunc=None):
if availableTargets != None:
available = availableTargets
else:
diff --git a/tests/system/suite_APTW/tst_APTW03/test.py b/tests/system/suite_APTW/tst_APTW03/test.py
index ca1378196a..f3cf82f169 100644
--- a/tests/system/suite_APTW/tst_APTW03/test.py
+++ b/tests/system/suite_APTW/tst_APTW03/test.py
@@ -57,8 +57,8 @@ def handleInsertVirtualFunctions(expected):
def checkSimpleCppLib(projectName, static):
projectName, className = createNewCPPLib(tempDir(), projectName, "MyClass",
- target=Targets.desktopTargetClasses(),
- isStatic=static)
+ Targets.desktopTargetClasses(),
+ static)
for kit, config in iterateBuildConfigs("Release"):
verifyBuildConfig(kit, config, False, True)
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
@@ -79,10 +79,8 @@ def main():
checkSimpleCppLib("SampleApp1", False)
checkSimpleCppLib("SampleApp2", True)
- # Qt Plugin needs Qt4.8 for QGenericPlugin which is tested by default
- targets = Targets.desktopTargetClasses()
projectName, className = createNewQtPlugin(tempDir(), "SampleApp3", "MyPlugin",
- target=targets)
+ Targets.desktopTargetClasses())
virtualFunctionsAdded = False
for kit, config in iterateBuildConfigs("Debug"):
is487Kit = kit in (Targets.DESKTOP_4_8_7_DEFAULT, Targets.EMBEDDED_LINUX)
diff --git a/tests/system/suite_CSUP/tst_CSUP03/test.py b/tests/system/suite_CSUP/tst_CSUP03/test.py
index 21bc53f5c2..c82e9a32ee 100644
--- a/tests/system/suite_CSUP/tst_CSUP03/test.py
+++ b/tests/system/suite_CSUP/tst_CSUP03/test.py
@@ -83,7 +83,8 @@ def main():
continue
if not startCreator(useClang):
continue
- projectName = createNewNonQtProject()
+ projectName = createNewNonQtProject(tempDir(), "project_csup03",
+ [Targets.DESKTOP_4_8_7_DEFAULT])
checkCodeModelSettings(useClang)
openDocument("%s.Sources.main\\.cpp" % projectName)
editor = getEditorForFileSuffix("main.cpp")