forked from qt-creator/qt-creator
Squish: Explicitly use qmake-based projects in suite_APTW
Creator's default build system is CMake now which broke the tests. Change-Id: I901b44dd4545a297d0100da5d92aa1bea79e41d3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (C) 2016 The Qt Company Ltd.
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# Contact: https://www.qt.io/licensing/
|
||||
#
|
||||
# This file is part of Qt Creator.
|
||||
@@ -224,15 +224,19 @@ def __modifyAvailableTargets__(available, requiredQt, asStrings=False):
|
||||
if Qt5Path.toVersionTuple(found.group(1)) < Qt5Path.toVersionTuple(requiredQt):
|
||||
available.discard(currentItem)
|
||||
|
||||
|
||||
# Creates a Qt GUI project
|
||||
# param path specifies where to create the project
|
||||
# param projectName is the name for the new project
|
||||
# param checks turns tests in the function on if set to True
|
||||
def createProject_Qt_GUI(path, projectName, checks = True, addToVersionControl = "<None>"):
|
||||
# param addToVersionControl selects the specified VCS from Creator's wizard
|
||||
# param buildSystem selects the specified build system from Creator's wizard
|
||||
def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="<None>",
|
||||
buildSystem=None):
|
||||
template = "Qt Widgets Application"
|
||||
available = __createProjectOrFileSelectType__(" Application (Qt)", template)
|
||||
__createProjectSetNameAndPath__(path, projectName, checks)
|
||||
buildSystem = __handleBuildSystem__(None)
|
||||
buildSystem = __handleBuildSystem__(buildSystem)
|
||||
|
||||
if checks:
|
||||
exp_filename = "mainwindow"
|
||||
@@ -375,7 +379,8 @@ def createNewNonQtProject(workingDir, projectName, target, plainC=False, buildSy
|
||||
__createProjectHandleLastPage__()
|
||||
return projectName
|
||||
|
||||
def createNewCPPLib(projectDir, projectName, className, target, isStatic):
|
||||
|
||||
def createNewCPPLib(projectDir, projectName, className, target, isStatic, buildSystem=None):
|
||||
available = __createProjectOrFileSelectType__(" Library", "C++ Library", False, True)
|
||||
if isStatic:
|
||||
libType = LibType.STATIC
|
||||
@@ -384,7 +389,7 @@ def createNewCPPLib(projectDir, projectName, className, target, isStatic):
|
||||
if projectDir == None:
|
||||
projectDir = tempDir()
|
||||
projectName = __createProjectSetNameAndPath__(projectDir, projectName, False)
|
||||
__handleBuildSystem__(None)
|
||||
__handleBuildSystem__(buildSystem)
|
||||
selectFromCombo(waitForObject("{name='Type' type='QComboBox' visible='1' "
|
||||
"window=':New_ProjectExplorer::JsonWizard'}"),
|
||||
LibType.getStringForLib(libType))
|
||||
@@ -396,10 +401,12 @@ def createNewCPPLib(projectDir, projectName, className, target, isStatic):
|
||||
__createProjectHandleLastPage__()
|
||||
return projectName, className
|
||||
|
||||
def createNewQtPlugin(projectDir, projectName, className, target, baseClass="QGenericPlugin"):
|
||||
|
||||
def createNewQtPlugin(projectDir, projectName, className, target, baseClass="QGenericPlugin",
|
||||
buildSystem=None):
|
||||
available = __createProjectOrFileSelectType__(" Library", "C++ Library", False, True)
|
||||
projectName = __createProjectSetNameAndPath__(projectDir, projectName, False)
|
||||
__handleBuildSystem__(None)
|
||||
__handleBuildSystem__(buildSystem)
|
||||
selectFromCombo(waitForObject("{name='Type' type='QComboBox' visible='1' "
|
||||
"window=':New_ProjectExplorer::JsonWizard'}"),
|
||||
LibType.getStringForLib(LibType.QT_PLUGIN))
|
||||
|
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (C) 2016 The Qt Company Ltd.
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# Contact: https://www.qt.io/licensing/
|
||||
#
|
||||
# This file is part of Qt Creator.
|
||||
@@ -31,7 +31,7 @@ def main():
|
||||
# warnings from the clang code model in "issues" view
|
||||
if not startCreatorVerifyingClang(False):
|
||||
return
|
||||
createProject_Qt_GUI(tempDir(), "SampleApp")
|
||||
createProject_Qt_GUI(tempDir(), "SampleApp", buildSystem="qmake")
|
||||
# run project for debug and release and verify results
|
||||
runVerify()
|
||||
#close Qt Creator
|
||||
|
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (C) 2016 The Qt Company Ltd.
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# Contact: https://www.qt.io/licensing/
|
||||
#
|
||||
# This file is part of Qt Creator.
|
||||
@@ -30,7 +30,7 @@ def main():
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
createNewQtQuickApplication(tempDir(), "SampleApp")
|
||||
createNewQtQuickApplication(tempDir(), "SampleApp", buildSystem="qmake")
|
||||
# run project for debug and release and verify results
|
||||
runVerify()
|
||||
#close Qt Creator
|
||||
|
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (C) 2016 The Qt Company Ltd.
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# Contact: https://www.qt.io/licensing/
|
||||
#
|
||||
# This file is part of Qt Creator.
|
||||
@@ -65,7 +65,7 @@ def handleInsertVirtualFunctions(expected, toAdd):
|
||||
def checkSimpleCppLib(projectName, static):
|
||||
projectName, className = createNewCPPLib(tempDir(), projectName, "MyClass",
|
||||
Targets.desktopTargetClasses(),
|
||||
static)
|
||||
static, buildSystem="qmake")
|
||||
for kit, config in iterateBuildConfigs("Release"):
|
||||
verifyBuildConfig(kit, config, False, True)
|
||||
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
|
||||
@@ -87,7 +87,8 @@ def main():
|
||||
checkSimpleCppLib("SampleApp2", True)
|
||||
|
||||
pluginTargets = (Targets.DESKTOP_5_10_1_DEFAULT, Targets.DESKTOP_5_14_1_DEFAULT)
|
||||
projectName, className = createNewQtPlugin(tempDir(), "SampleApp3", "MyPlugin", pluginTargets)
|
||||
projectName, className = createNewQtPlugin(tempDir(), "SampleApp3", "MyPlugin", pluginTargets,
|
||||
buildSystem="qmake")
|
||||
virtualFunctionsAdded = False
|
||||
for kit, config in iterateBuildConfigs("Debug"):
|
||||
verifyBuildConfig(kit, config, True, True)
|
||||
|
Reference in New Issue
Block a user