forked from qt-creator/qt-creator
Squish: Enclose code model tests in sections
Change-Id: I4478acfc5ea7b3fa22d1cd17576e04fdda81dbb9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -2,7 +2,7 @@ Prerequisites - general information
|
||||
-----------------------------------
|
||||
Squish tests inside this folder have several prerequisites to get them running.
|
||||
|
||||
First - and most important - you have to own a valid Squish license. Currently it's recommended to use Squish 6.0.
|
||||
First - and most important - you have to own a valid Squish license. At least Squish 6.0 is required.
|
||||
|
||||
Second - some of the test suites/test cases expect a build of Qt 4.8.7 to be available:
|
||||
1. Download the source code from:
|
||||
|
@@ -61,11 +61,13 @@ def __openCodeModelOptions__():
|
||||
clickItem(":Options_QListView", "C++", 14, 15, 0, Qt.LeftButton)
|
||||
clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Code Model")
|
||||
|
||||
def checkCodeModelSettings(useClang):
|
||||
def getCodeModelString(useClang):
|
||||
codeModelName = "built-in"
|
||||
if useClang:
|
||||
codeModelName = "Clang"
|
||||
test.log("Testing code model: %s" % codeModelName)
|
||||
return "Testing code model: %s" % codeModelName
|
||||
|
||||
def checkCodeModelSettings(useClang):
|
||||
__openCodeModelOptions__()
|
||||
test.verify(verifyChecked("{name='ignorePCHCheckBox' type='QCheckBox' visible='1'}"),
|
||||
"Verifying whether 'Ignore pre-compiled headers' is checked by default.")
|
||||
|
@@ -231,3 +231,13 @@ class Qt5Path:
|
||||
path = "Docs/Qt-5.%d" % qtMinorVersion
|
||||
|
||||
return os.path.join(Qt5Path.__createPlatformQtPath__(qtMinorVersion), path)
|
||||
|
||||
class TestSection:
|
||||
def __init__(self, description):
|
||||
self.description = description
|
||||
|
||||
def __enter__(self):
|
||||
test.startSection(self.description)
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
test.endSection()
|
||||
|
@@ -44,6 +44,7 @@ def triggerCompletion(editorWidget):
|
||||
# entry of test
|
||||
def main():
|
||||
for useClang in [False, True]:
|
||||
with TestSection(getCodeModelString(useClang)):
|
||||
if not startCreator(useClang):
|
||||
continue
|
||||
# create qt quick application
|
||||
|
@@ -28,6 +28,7 @@ source("../../shared/qtcreator.py")
|
||||
# entry of test
|
||||
def main():
|
||||
for useClang in [False, True]:
|
||||
with TestSection(getCodeModelString(useClang)):
|
||||
if not startCreator(useClang):
|
||||
continue
|
||||
# create qt quick application
|
||||
|
@@ -76,6 +76,7 @@ def main():
|
||||
"do while" : ["", "int dummy = 0;", "do", "++dummy;", "while (dummy < 10);"]
|
||||
}
|
||||
for useClang in [False, True]:
|
||||
with TestSection(getCodeModelString(useClang)):
|
||||
if not startCreator(useClang):
|
||||
continue
|
||||
projectName = createNewNonQtProject()
|
||||
|
@@ -36,6 +36,7 @@ def main():
|
||||
templateDir = prepareTemplate(sourceExample)
|
||||
examplePath = os.path.join(templateDir, proFile)
|
||||
for useClang in [False, True]:
|
||||
with TestSection(getCodeModelString(useClang)):
|
||||
if not startCreator(useClang):
|
||||
continue
|
||||
# open example project
|
||||
|
@@ -36,6 +36,7 @@ def main():
|
||||
templateDir = prepareTemplate(sourceExample)
|
||||
examplePath = os.path.join(templateDir, proFile)
|
||||
for useClang in [False, True]:
|
||||
with TestSection(getCodeModelString(useClang)):
|
||||
if not startCreator(useClang):
|
||||
continue
|
||||
# open example project
|
||||
|
@@ -162,6 +162,7 @@ def main():
|
||||
templateDir = prepareTemplate(examplePath)
|
||||
examplePath = os.path.join(templateDir, "cplusplus-tools.pro")
|
||||
for useClang in [False, True]:
|
||||
with TestSection(getCodeModelString(useClang)):
|
||||
if not startCreator(useClang):
|
||||
continue
|
||||
openQmakeProject(examplePath, [Targets.DESKTOP_531_DEFAULT])
|
||||
|
@@ -27,6 +27,7 @@ source("../../shared/qtcreator.py")
|
||||
|
||||
def main():
|
||||
for useClang in [False, True]:
|
||||
with TestSection(getCodeModelString(useClang)):
|
||||
if not startCreator(useClang):
|
||||
continue
|
||||
createProject_Qt_Console(tempDir(), "SquishProject")
|
||||
|
Reference in New Issue
Block a user