Commit 18e0363c authored by Christian Stenger's avatar Christian Stenger
Browse files

Squish: Remove unnecessary calls to clean up



Change-Id: I981392e5ef3397c3b80f1031e0644f84de1445f2
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent fa63059c
source("../../shared/qtcreator.py")
workingDir = None
templateDir = None
searchFinished = False
def main():
global workingDir,templateDir
global templateDir
sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/keyinteraction/focus")
qmlFile = os.path.join("qml", "focus.qml")
if not neededFilePresent(os.path.join(sourceExample, qmlFile)):
......@@ -13,12 +12,11 @@ def main():
startApplication("qtcreator" + SettingsPath)
# add docs to have the correct tool tips
addHelpDocumentationFromSDK()
# using a temporary directory won't mess up an eventually exisiting
workingDir = tempDir()
templateDir = prepareTemplate(sourceExample)
prepareForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
installLazySignalHandler("{type='Core::FutureProgress' unnamed='1'}", "finished()", "__handleFutureProgress__")
createNewQtQuickApplication(workingDir, "untitled", os.path.join(templateDir, qmlFile))
# using a temporary directory won't mess up a potentially existing
createNewQtQuickApplication(tempDir(), "untitled", os.path.join(templateDir, qmlFile))
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
testRenameId()
......@@ -185,14 +183,6 @@ def maskSpecialCharsForProjectTree(filename):
filename = filename.replace("/?","\\?").replace("/*","\\*")
return filename
def cleanup():
global workingDir, templateDir
waitForCleanShutdown()
if workingDir!=None:
deleteDirIfExists(workingDir)
if templateDir!=None:
deleteDirIfExists(os.path.dirname(templateDir))
def __handleFutureProgress__(obj):
global searchFinished
if className(obj) == "Core::FutureProgress":
......
source("../../shared/qtcreator.py")
def main():
global workingDir
startApplication("qtcreator" + SettingsPath)
# using a temporary directory won't mess up an eventually exisiting
workingDir = tempDir()
createNewQtQuickApplication(workingDir, "untitled")
# using a temporary directory won't mess up a potentially exisiting
createNewQtQuickApplication(tempDir(), "untitled")
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 5000)
if not prepareQmlFile():
......@@ -75,11 +73,3 @@ def testReIndent():
def shrinkText(txt, lines=10):
return "".join(txt.splitlines(True)[0:lines])
def cleanup():
global workingDir
# waiting for a clean exit - for a full-remove of the temp directory
waitForCleanShutdown()
if workingDir!=None:
deleteDirIfExists(workingDir)
......@@ -51,4 +51,3 @@ def main():
test.compare(editor.textCursor().selectionEnd(), pos)
test.compare(editor.textCursor().position(), pos)
invokeMenuItem("File", "Exit")
waitForCleanShutdown()
......@@ -40,7 +40,6 @@ def main():
# Add a new run configuration
invokeMenuItem("File", "Exit")
waitForCleanShutdown()
def init():
global SpeedCrunchPath
......
......@@ -19,7 +19,6 @@ def main():
if not result:
test.fatal("Could not open/create cmake project - leaving test")
invokeMenuItem("File", "Exit")
waitForCleanShutdown()
return
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
......@@ -32,7 +31,6 @@ def main():
checkLastBuild()
invokeMenuItem("File", "Exit")
waitForCleanShutdown()
def init():
global SpeedCrunchPath
......
......@@ -3,7 +3,7 @@ source("../../shared/qtcreator.py")
import re
def main():
global templateDir, textChanged
global textChanged
sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/text/textselection")
qmlFile = os.path.join("qml", "textselection.qml")
if not neededFilePresent(os.path.join(sourceExample, qmlFile)):
......@@ -99,13 +99,6 @@ def main():
clickButton(waitForObject("{text='Cancel' type='QPushButton' unnamed='1' visible='1'}"))
invokeMenuItem("File", "Exit")
def cleanup():
global templateDir
# waiting for a clean exit - for a full-remove of the temp directory
waitForCleanShutdown()
if templateDir!=None:
deleteDirIfExists(os.path.dirname(templateDir))
def __handleTextChanged__(object):
global textChanged
textChanged = True
......@@ -24,7 +24,6 @@ def main():
test.compare(wordUnderCursor(waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")), "QList")
invokeMenuItem("File", "Exit")
waitForCleanShutdown()
def init():
cleanup()
......
source("../../shared/qtcreator.py")
workingDir = None
def main():
global workingDir
startApplication("qtcreator" + SettingsPath)
# using a temporary directory won't mess up an eventually exisiting
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
projectName = createNewQtQuickApplication(workingDir, targets = QtQuickConstants.Targets.DESKTOP_474_GCC)
# wait for parsing to complete
......@@ -40,11 +37,3 @@ def subprocessFunction():
"enabled='true' text='Hello World' type='Text' unnamed='1' visible='true'}")
test.log("Clicking 'Hello World' Text to close QmlApplicationViewer")
mouseClick(helloWorldText, 5, 5, 0, Qt.LeftButton)
def cleanup():
global workingDir
# waiting for a clean exit - for a full-remove of the temp directory
waitForCleanShutdown()
if workingDir != None:
deleteDirIfExists(workingDir)
source("../../shared/qtcreator.py")
workingDir = None
templateDir = None
def main():
global workingDir,templateDir
sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/text/textselection")
qmlFile = os.path.join("qml", "textselection.qml")
if not neededFilePresent(os.path.join(sourceExample, qmlFile)):
return
startApplication("qtcreator" + SettingsPath)
# using a temporary directory won't mess up an eventually exisiting
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
templateDir = prepareTemplate(sourceExample)
projectName = createNewQtQuickApplication(workingDir, None, os.path.join(templateDir, qmlFile))
projectName = createNewQtQuickApplication(workingDir, None, os.path.join(prepareTemplate(sourceExample), qmlFile))
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
test.log("Building project")
......@@ -50,12 +45,3 @@ def subprocessFunction():
typeLines(textEdit, "This text is entered by Squish...")
test.log("Closing QmlApplicationViewer")
sendEvent("QCloseEvent", "{type='QmlApplicationViewer' unnamed='1' visible='1'}")
def cleanup():
global workingDir,templateDir
# waiting for a clean exit - for a full-remove of the temp directory
waitForCleanShutdown()
if workingDir!=None:
deleteDirIfExists(workingDir)
if templateDir!=None:
deleteDirIfExists(os.path.dirname(templateDir))
source("../../shared/qtcreator.py")
workingDir = None
def main():
global workingDir
startApplication("qtcreator" + SettingsPath)
# using a temporary directory won't mess up an eventually exisiting
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
projectName = createNewQtQuickUI(workingDir)
test.log("Running project")
......@@ -26,11 +24,3 @@ def main():
if result:
logApplicationOutput()
invokeMenuItem("File", "Exit")
def cleanup():
global workingDir
# waiting for a clean exit - for a full-remove of the temp directory
waitForCleanShutdown()
if workingDir!=None:
deleteDirIfExists(workingDir)
source("../../shared/qtcreator.py")
workingDir = None
def main():
global workingDir
startApplication("qtcreator" + SettingsPath)
# using a temporary directory won't mess up an eventually exisiting
workingDir = tempDir()
createNewQmlExtension(workingDir)
# using a temporary directory won't mess up a potentially existing
createNewQmlExtension(tempDir())
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
test.log("Building project")
......@@ -16,11 +12,3 @@ def main():
checkCompile()
checkLastBuild()
invokeMenuItem("File", "Exit")
def cleanup():
global workingDir
# waiting for a clean exit - for a full-remove of the temp directory
waitForCleanShutdown()
if workingDir!=None:
deleteDirIfExists(workingDir)
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