forked from qt-creator/qt-creator
Squish: Refactor starting Qt Creator from Squish
Change-Id: I7cbce7db2a22a7cb327965b9b7918eb46266b260 Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
@@ -23,10 +23,11 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
def startCreatorTryingClang():
|
||||
def startCreatorVerifyingClang(useClang):
|
||||
try:
|
||||
# start Qt Creator with enabled ClangCodeModel plugin (without modifying settings)
|
||||
startApplication("qtcreator -load ClangCodeModel" + SettingsPath)
|
||||
# start Qt Creator with / without enabled ClangCodeModel plugin (without modifying settings)
|
||||
loadOrNoLoad = '-load' if useClang else '-noload'
|
||||
startQC([loadOrNoLoad, 'ClangCodeModel'])
|
||||
except RuntimeError:
|
||||
t, v = sys.exc_info()[:2]
|
||||
strv = str(v)
|
||||
@@ -35,26 +36,17 @@ def startCreatorTryingClang():
|
||||
else:
|
||||
test.fatal("Exception caught", "%s(%s)" % (str(t), strv))
|
||||
return False
|
||||
if platform.system() not in ('Microsoft', 'Windows'): # only Win uses dialogs for this
|
||||
return startedWithoutPluginError()
|
||||
errorMsg = "{type='QMessageBox' unnamed='1' visible='1' windowTitle='Qt Creator'}"
|
||||
errorOK = "{text='OK' type='QPushButton' unnamed='1' visible='1' window=%s}" % errorMsg
|
||||
if not waitFor("object.exists(errorOK)", 5000):
|
||||
return True
|
||||
return startedWithoutPluginError()
|
||||
clickButton(errorOK) # Error message
|
||||
clickButton(errorOK) # Help message
|
||||
test.fatal("ClangCodeModel plugin not available.")
|
||||
return False
|
||||
|
||||
def startCreator(useClang):
|
||||
try:
|
||||
if useClang:
|
||||
if not startCreatorTryingClang():
|
||||
return False
|
||||
else:
|
||||
startApplication("qtcreator -noload ClangCodeModel" + SettingsPath)
|
||||
finally:
|
||||
overrideStartApplication()
|
||||
return startedWithoutPluginError()
|
||||
|
||||
def __openCodeModelOptions__():
|
||||
invokeMenuItem("Tools", "Options...")
|
||||
waitForObjectItem(":Options_QListView", "C++")
|
||||
|
@@ -37,11 +37,10 @@ from datetime import datetime,timedelta;
|
||||
import __builtin__
|
||||
|
||||
srcPath = ''
|
||||
SettingsPath = ''
|
||||
SettingsPath = []
|
||||
tmpSettingsDir = ''
|
||||
testSettings.logScreenshotOnFail = True
|
||||
testSettings.logScreenshotOnError = True
|
||||
__origStartApplication__ = None
|
||||
|
||||
source("../../shared/classes.py")
|
||||
source("../../shared/utils.py")
|
||||
@@ -55,24 +54,18 @@ source("../../shared/clang.py")
|
||||
source("../../shared/welcome.py")
|
||||
source("../../shared/workarounds.py") # include this at last
|
||||
|
||||
# ATTENTION: if a test case calls startApplication("qtcreator...") for several times this
|
||||
# function must be called BEFORE any call except the first (which is done always automatically)
|
||||
def overrideStartApplication():
|
||||
global startApplication, __origStartApplication__
|
||||
if (platform.system() == "Linux"):
|
||||
return
|
||||
if (__origStartApplication__ == None):
|
||||
__origStartApplication__ = startApplication
|
||||
def startApplication(*args):
|
||||
args = list(args)
|
||||
if str(args[0]).startswith('qtcreator'):
|
||||
if platform.system() == 'Darwin':
|
||||
args[0] = args[0].replace('qtcreator', '"Qt Creator"', 1)
|
||||
test.log("Using workaround for MacOS (different AUT name)")
|
||||
else:
|
||||
args[0] = args[0] + ' -platform windows:dialogs=none'
|
||||
test.log("Using workaround for Windows (failing to hook into native FileDialog)")
|
||||
return __origStartApplication__(*args)
|
||||
# additionalParameters must be a list or tuple of strings or None
|
||||
def startQC(additionalParameters=None, withPreparedSettingsPath=True):
|
||||
global SettingsPath
|
||||
appWithOptions = ['"Qt Creator"' if platform.system() == 'Darwin' else "qtcreator"]
|
||||
if withPreparedSettingsPath:
|
||||
appWithOptions.extend(SettingsPath)
|
||||
if additionalParameters is not None:
|
||||
appWithOptions.extend(additionalParameters)
|
||||
if platform.system() in ('Microsoft', 'Windows'): # for hooking into native file dialog
|
||||
appWithOptions.extend(('-platform', 'windows:dialogs=none'))
|
||||
test.log("Starting now: %s" % ' '.join(appWithOptions))
|
||||
startApplication(' '.join(appWithOptions))
|
||||
|
||||
def startedWithoutPluginError():
|
||||
try:
|
||||
@@ -304,7 +297,7 @@ def copySettingsToTmpDir(destination=None, omitFiles=[]):
|
||||
elif platform.system() in ('Windows', 'Microsoft'):
|
||||
substituteCdb(tmpSettingsDir)
|
||||
substituteUnchosenTargetABIs(tmpSettingsDir)
|
||||
SettingsPath = ' -settingspath "%s"' % tmpSettingsDir
|
||||
SettingsPath = ['-settingspath', '"%s"' % tmpSettingsDir]
|
||||
|
||||
# current dir is directory holding qtcreator.py
|
||||
origSettingsDir = os.path.abspath(os.path.join(os.getcwd(), "..", "..", "settings"))
|
||||
@@ -320,8 +313,6 @@ else:
|
||||
|
||||
srcPath = os.getenv("SYSTEST_SRCPATH", os.path.expanduser(os.path.join("~", "squish-data")))
|
||||
|
||||
overrideStartApplication()
|
||||
|
||||
# the following only doesn't work if the test ends in an exception
|
||||
if os.getenv("SYSTEST_NOSETTINGSPATH") != "1":
|
||||
copySettingsToTmpDir()
|
||||
|
@@ -29,8 +29,7 @@ source("../../shared/qtcreator.py")
|
||||
def main():
|
||||
# Start Creator with built-in code model, to avoid having
|
||||
# warnings from the clang code model in "issues" view
|
||||
startCreator(False)
|
||||
if not startedWithoutPluginError():
|
||||
if not startCreatorVerifyingClang(False):
|
||||
return
|
||||
createProject_Qt_GUI(tempDir(), "SampleApp")
|
||||
# run project for debug and release and verify results
|
||||
|
@@ -27,7 +27,7 @@ source("../../shared/qtcreator.py")
|
||||
|
||||
# test New Qt Quick Application build and run for release and debug option
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
createNewQtQuickApplication(tempDir(), "SampleApp")
|
||||
|
@@ -72,7 +72,7 @@ def addReturn(editor, toFunction, returnValue):
|
||||
type(editor, "return %s;" % returnValue)
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
|
||||
|
@@ -36,7 +36,7 @@ def main():
|
||||
# copy example project to temp directory
|
||||
templateDir = prepareTemplate(sourceExample, "/../shared")
|
||||
examplePath = os.path.join(templateDir, proFile)
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
# open example project, supports only Qt 5
|
||||
|
@@ -37,7 +37,7 @@ def main():
|
||||
# copy example project to temp directory
|
||||
templateDir = prepareTemplate(sourceExample, "/../shared")
|
||||
examplePath = os.path.join(templateDir, proFile)
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
# open example project
|
||||
|
@@ -45,7 +45,7 @@ def triggerCompletion(editorWidget):
|
||||
def main():
|
||||
for useClang in [False, True]:
|
||||
with TestSection(getCodeModelString(useClang)):
|
||||
if not startCreator(useClang):
|
||||
if not startCreatorVerifyingClang(useClang):
|
||||
continue
|
||||
# create qt quick application
|
||||
# Step 1: Open test .pro project.
|
||||
|
@@ -29,7 +29,7 @@ source("../../shared/qtcreator.py")
|
||||
def main():
|
||||
for useClang in [False, True]:
|
||||
with TestSection(getCodeModelString(useClang)):
|
||||
if not startCreator(useClang):
|
||||
if not startCreatorVerifyingClang(useClang):
|
||||
continue
|
||||
# create qt quick application
|
||||
# Step 1: Open test .pro project.
|
||||
|
@@ -81,7 +81,7 @@ def main():
|
||||
and JIRA.isBugStillOpen(18607)):
|
||||
test.warning("Skipping unstable tests on Windows", "See QTCREATORBUG-18607")
|
||||
continue
|
||||
if not startCreator(useClang):
|
||||
if not startCreatorVerifyingClang(useClang):
|
||||
continue
|
||||
projectName = createNewNonQtProject(tempDir(), "project_csup03",
|
||||
[Targets.DESKTOP_4_8_7_DEFAULT])
|
||||
|
@@ -39,7 +39,7 @@ def main():
|
||||
examplePath = os.path.join(templateDir, proFile)
|
||||
for useClang in [False, True]:
|
||||
with TestSection(getCodeModelString(useClang)):
|
||||
if not startCreator(useClang):
|
||||
if not startCreatorVerifyingClang(useClang):
|
||||
continue
|
||||
# open example project
|
||||
openQmakeProject(examplePath)
|
||||
|
@@ -38,7 +38,7 @@ def main():
|
||||
examplePath = os.path.join(templateDir, proFile)
|
||||
for useClang in [False, True]:
|
||||
with TestSection(getCodeModelString(useClang)):
|
||||
if not startCreator(useClang):
|
||||
if not startCreatorVerifyingClang(useClang):
|
||||
continue
|
||||
# open example project
|
||||
openQmakeProject(examplePath)
|
||||
|
@@ -163,7 +163,7 @@ def main():
|
||||
examplePath = os.path.join(templateDir, "cplusplus-tools.pro")
|
||||
for useClang in [False, True]:
|
||||
with TestSection(getCodeModelString(useClang)):
|
||||
if not startCreator(useClang):
|
||||
if not startCreatorVerifyingClang(useClang):
|
||||
continue
|
||||
openQmakeProject(examplePath, [Targets.DESKTOP_5_6_1_DEFAULT])
|
||||
checkCodeModelSettings(useClang)
|
||||
|
@@ -106,7 +106,7 @@ def main():
|
||||
if not expectedVersion:
|
||||
test.fatal("Can't find version from file.")
|
||||
return
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
setKeyboardShortcutForAboutQtC()
|
||||
|
@@ -76,7 +76,7 @@ def verifyUrl(expected):
|
||||
|
||||
def main():
|
||||
noMatch = "Your search did not match any documents."
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
addHelpDocumentation([os.path.join(qt4Path, "doc", "qch", "qt.qch")])
|
||||
|
@@ -45,7 +45,7 @@ def verifyInteractiveQMLHelp(lineText, helpText):
|
||||
% (helpText, getHelpTitle()))
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
qchs = []
|
||||
|
@@ -46,7 +46,7 @@ def textForQtVersion(text):
|
||||
return text
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
# goto help mode and click on topic
|
||||
|
@@ -26,7 +26,7 @@
|
||||
source("../../shared/qtcreator.py")
|
||||
|
||||
def startQtCreatorWithNewAppAtQMLEditor(projectDir, projectName, line = None):
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return None
|
||||
# create qt quick application
|
||||
|
@@ -76,7 +76,7 @@ def main():
|
||||
templateDir = prepareTemplate(sourceExample)
|
||||
examplePath = os.path.join(templateDir, proFile)
|
||||
templateDir = os.path.join(templateDir, "basics") # only check subproject
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
# open example project
|
||||
|
@@ -27,7 +27,7 @@ source("../../shared/qtcreator.py")
|
||||
|
||||
# entry of test
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
# create qt quick application
|
||||
|
@@ -28,7 +28,7 @@ source("../../shared/suites_qtta.py")
|
||||
|
||||
# entry of test
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
# create qt quick application
|
||||
|
@@ -35,7 +35,7 @@ def main():
|
||||
"'SyntaxError': undeclared identifier", # MSVC2015
|
||||
"use of undeclared identifier 'SyntaxError'",
|
||||
"unknown type name 'SyntaxError'"]
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
# create qt quick application
|
||||
|
@@ -35,7 +35,7 @@ def verifyChangeProject(projectName):
|
||||
def main():
|
||||
projectName1 = "SampleApp1"
|
||||
projectName2 = "SampleApp2"
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
# create qt quick application 1
|
||||
|
@@ -75,7 +75,7 @@ def checkTableViewForContent(tableViewStr, expectedRegExTitle, section, atLeastO
|
||||
def main():
|
||||
global getStarted
|
||||
# open Qt Creator
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
|
||||
|
@@ -70,7 +70,7 @@ def main():
|
||||
if not neededFilePresent(sourceExample):
|
||||
return
|
||||
# open Qt Creator
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
|
||||
|
@@ -59,7 +59,7 @@ def openExample(examplesLineEdit, input, exampleRegex, exampleName):
|
||||
|
||||
def main():
|
||||
# open Qt Creator
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
qchs = []
|
||||
|
@@ -27,7 +27,7 @@ source("../../shared/qtcreator.py")
|
||||
|
||||
def main():
|
||||
# open Qt Creator
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Get Started Now')
|
||||
|
@@ -28,7 +28,7 @@ source("../../shared/qtcreator.py")
|
||||
project = "SquishProject"
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
createProject_Qt_Console(tempDir(), project)
|
||||
|
@@ -31,7 +31,7 @@ def main():
|
||||
outputQDebug = "Output from qDebug()."
|
||||
outputStdOut = "Output from std::cout."
|
||||
outputStdErr = "Output from std::cerr."
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
createProject_Qt_Console(tempDir(), project)
|
||||
|
@@ -43,7 +43,7 @@ def addFileToProject(projectPath, category, fileTemplate, fileName):
|
||||
__createProjectHandleLastPage__()
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
targets = Targets.desktopTargetClasses()
|
||||
|
@@ -119,7 +119,7 @@ def main():
|
||||
return
|
||||
qmlProjFile = os.path.join(qmlProjDir, projName)
|
||||
# start Creator by passing a .qmlproject file
|
||||
startApplication('qtcreator' + SettingsPath + ' "%s"' % qmlProjFile)
|
||||
startQC(['"%s"' % qmlProjFile])
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
|
||||
|
@@ -40,7 +40,7 @@ def main():
|
||||
return
|
||||
qmlProjFile = os.path.join(qmlProjDir, projName)
|
||||
# start Creator by passing a .qmlproject file
|
||||
startApplication('qtcreator' + SettingsPath + ' "%s"' % qmlProjFile)
|
||||
startQC(['"%s"' % qmlProjFile])
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
waitFor('object.exists(":Qt Creator_Utils::NavigationTreeView")', 10000)
|
||||
|
@@ -26,7 +26,7 @@
|
||||
source("../../shared/qtcreator.py")
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
# using a temporary directory won't mess up a potentially existing
|
||||
|
@@ -26,7 +26,7 @@
|
||||
source("../../shared/qtcreator.py")
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
# using a temporary directory won't mess up a potentially existing
|
||||
|
@@ -38,7 +38,7 @@ def main():
|
||||
proFile = os.path.join(tempDir, proFileName)
|
||||
cleanUpUserFiles(proFile)
|
||||
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
openQmakeProject(proFile)
|
||||
|
@@ -29,7 +29,7 @@ def main():
|
||||
files = checkAndCopyFiles(testData.dataset("files.tsv"), "filename", tempDir())
|
||||
if not files:
|
||||
return
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
for currentFile in files:
|
||||
|
@@ -41,7 +41,7 @@ def main():
|
||||
files = checkAndCopyFiles(testData.dataset("files.tsv"), "filename", tempDir())
|
||||
if not files:
|
||||
return
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
|
||||
|
@@ -171,7 +171,7 @@ def displayHintForHighlighterDefinition(fileName, patterns, lPatterns, added, ad
|
||||
|
||||
def main():
|
||||
miss = "A highlight definition was not found for this file. Would you like to try to find one?"
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
uncheckGenericHighlighterFallback()
|
||||
|
@@ -28,7 +28,7 @@ source("../../shared/qtcreator.py")
|
||||
def main():
|
||||
for useClang in [False, True]:
|
||||
with TestSection(getCodeModelString(useClang)):
|
||||
if not startCreator(useClang):
|
||||
if not startCreatorVerifyingClang(useClang):
|
||||
continue
|
||||
createProject_Qt_Console(tempDir(), "SquishProject")
|
||||
checkCodeModelSettings(useClang)
|
||||
|
@@ -36,7 +36,7 @@ def main():
|
||||
return
|
||||
if not changeFilePermissions(testFolder, True, False, "testfiles.pro"):
|
||||
test.fatal("Could not set permissions for files to read-only - test will likely fail.")
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
openQmakeProject(os.path.join(testFolder, "testfiles.pro"))
|
||||
|
@@ -33,7 +33,7 @@ def main():
|
||||
proFile = "keyinteraction.pro"
|
||||
if not neededFilePresent(os.path.join(sourceExample, proFile)):
|
||||
return
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
# add docs to have the correct tool tips
|
||||
|
@@ -26,7 +26,7 @@
|
||||
source("../../shared/qtcreator.py")
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
# using a temporary directory won't mess up a potentially existing
|
||||
|
@@ -35,7 +35,7 @@ def main():
|
||||
test.fatal("Could not prepare test files - leaving test")
|
||||
return
|
||||
proFile = os.path.join(folder, "testfiles.pro")
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
openQmakeProject(proFile)
|
||||
|
@@ -44,7 +44,7 @@ def main():
|
||||
test.fatal("Could not prepare test files - leaving test")
|
||||
return
|
||||
proFile = os.path.join(folder, "testfiles.pro")
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
openQmakeProject(proFile)
|
||||
|
@@ -35,7 +35,7 @@ def main():
|
||||
if not neededFilePresent(currentFile):
|
||||
return
|
||||
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
for currentFile in files:
|
||||
|
@@ -38,7 +38,7 @@ def buildConfigFromFancyToolButton(fancyToolButton):
|
||||
def main():
|
||||
if not neededFilePresent(SpeedCrunchPath):
|
||||
return
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
openQmakeProject(SpeedCrunchPath, [Targets.DESKTOP_4_8_7_DEFAULT])
|
||||
|
@@ -52,7 +52,7 @@ def main():
|
||||
if not neededFilePresent(SpeedCrunchPath):
|
||||
return
|
||||
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
result = openCmakeProject(SpeedCrunchPath, BuildPath)
|
||||
|
@@ -33,7 +33,7 @@ def main():
|
||||
else:
|
||||
test.warning("Could not find cmake in PATH - several tests won't run without.")
|
||||
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
kits = getConfiguredKits()
|
||||
|
@@ -26,7 +26,7 @@
|
||||
source("../../shared/qtcreator.py")
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath + " -customwizard-verbose")
|
||||
startQC(["-customwizard-verbose"])
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
|
||||
|
@@ -31,8 +31,7 @@ warningOrError = re.compile('<p><b>((Error|Warning).*?)</p>')
|
||||
def main():
|
||||
emptySettings = tempDir()
|
||||
__createMinimumIni__(emptySettings)
|
||||
SettingsPath = ' -settingspath "%s"' % emptySettings
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC(['-settingspath', '"%s"' % emptySettings], False)
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
invokeMenuItem("Tools", "Options...")
|
||||
|
@@ -27,8 +27,7 @@ source("../../shared/qtcreator.py")
|
||||
|
||||
def main():
|
||||
for lang in testData.dataset("languages.tsv"):
|
||||
overrideStartApplication()
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
invokeMenuItem("Tools", "Options...")
|
||||
@@ -47,8 +46,7 @@ def main():
|
||||
invokeMenuItem("File", "Exit")
|
||||
waitForCleanShutdown()
|
||||
snooze(4) # wait for complete unloading of Creator
|
||||
overrideStartApplication()
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
try:
|
||||
# Use Locator for menu items which wouldn't work on macOS
|
||||
exitCommand = testData.field(lang, "Exit")
|
||||
|
@@ -31,7 +31,7 @@ def main():
|
||||
sourceFileName = newClassName.lower() + ".cpp"
|
||||
basePath = tempDir()
|
||||
notOverwrittenComment = "// If you can read this, the file was not overwritten."
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
addCPlusPlusFile(newClassName, "C++ Class", None, newBasePath=basePath,
|
||||
|
@@ -30,7 +30,7 @@ def main():
|
||||
if not neededFilePresent(pathCreator):
|
||||
return
|
||||
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
openQbsProject(pathCreator)
|
||||
|
@@ -31,7 +31,7 @@ def main():
|
||||
if not neededFilePresent(pathCreator) or not neededFilePresent(pathSpeedcrunch):
|
||||
return
|
||||
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
|
||||
|
@@ -52,7 +52,7 @@ def __removeKit__(kit, kitName):
|
||||
clickButton(waitForObject(":Remove_QPushButton"))
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
createProject_Qt_Console(tempDir(), "SquishProject")
|
||||
|
@@ -36,7 +36,7 @@ def main():
|
||||
# copy example project to temp directory
|
||||
templateDir = prepareTemplate(sourceExample)
|
||||
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
usedProFile = os.path.join(templateDir, proFile)
|
||||
|
@@ -38,7 +38,7 @@ def ensureSaveBeforeBuildChecked(shouldBeChecked):
|
||||
clickButton(waitForObject(":Options.OK_QPushButton"))
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
ensureSaveBeforeBuildChecked(False)
|
||||
|
@@ -30,7 +30,7 @@ def main():
|
||||
if not projects:
|
||||
return
|
||||
sessionName = "SampleSession"
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
createAndSwitchToSession(sessionName)
|
||||
|
@@ -92,7 +92,7 @@ def getBuildIssuesTypeCounts(model):
|
||||
def main():
|
||||
tasksFile, issueTypes = generateMockTasksFile()
|
||||
expectedNo = sum(issueTypes)
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
ensureChecked(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton")
|
||||
|
@@ -36,7 +36,7 @@ def main():
|
||||
if not neededFilePresent(os.path.join(sourceExample, proFile)):
|
||||
return
|
||||
templateDir = prepareTemplate(sourceExample)
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
openQmakeProject(os.path.join(templateDir, proFile), [Targets.DESKTOP_5_6_1_DEFAULT])
|
||||
|
@@ -26,7 +26,7 @@
|
||||
source("../../shared/qtcreator.py")
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
|
||||
|
@@ -26,7 +26,7 @@
|
||||
source("../../shared/qtcreator.py")
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
available = ["5.6"]
|
||||
|
@@ -26,7 +26,7 @@
|
||||
source("../../shared/qtcreator.py")
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
for target in [Targets.DESKTOP_5_6_1_DEFAULT, Targets.DESKTOP_5_10_1_DEFAULT]:
|
||||
|
@@ -172,7 +172,7 @@ def fetchSnippet(protocol, description, pasteId, skippedPasting):
|
||||
return pasteId
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
protocolsToTest = [NAME_KDE, NAME_PBCA, NAME_PBCOM]
|
||||
|
@@ -26,7 +26,7 @@
|
||||
source("../../shared/qtcreator.py")
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
createProject_Qt_GUI(tempDir(), "DesignerTestApp")
|
||||
|
@@ -186,7 +186,7 @@ def verifyPreview(menuItems, comboItems):
|
||||
sendEvent("QCloseEvent", waitForObject(prev))
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
createProject_Qt_GUI(tempDir(), "DesignerTestApp", False)
|
||||
|
@@ -26,7 +26,7 @@
|
||||
source("../../shared/qtcreator.py")
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
createProject_Qt_GUI(tempDir(), "DesignerTestApp")
|
||||
|
@@ -81,7 +81,7 @@ def verifyFiles(targetDir):
|
||||
"Verify the existence of %s" % file)
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
for button in ["Cancel immediately",
|
||||
|
@@ -30,7 +30,7 @@ def main():
|
||||
if not neededFilePresent(pathReadme):
|
||||
return
|
||||
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
|
||||
|
@@ -161,7 +161,7 @@ def addEmptyFileOutsideProject(filename):
|
||||
__createProjectHandleLastPage__([filename], "Git", "<None>")
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
createProject_Qt_GUI(srcPath, projectName, addToVersionControl = "Git")
|
||||
|
@@ -26,7 +26,7 @@
|
||||
source("../../shared/qtcreator.py")
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startQC()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
invokeMenuItem("File", "Open File or Project...")
|
||||
|
Reference in New Issue
Block a user