forked from qt-creator/qt-creator
SquishTests: Move definition of regexVerify() to where it's used
Change-Id: I1f06a36c62acbd6662737bdd6657981f3cf04c36 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -107,6 +107,20 @@ def removeOldBreakpoints():
|
|||||||
# This can be the return value of setBreakpointsForCurrentProject() if you
|
# This can be the return value of setBreakpointsForCurrentProject() if you
|
||||||
# passed the breakpoints into that function in the right order
|
# passed the breakpoints into that function in the right order
|
||||||
def doSimpleDebugging(currentKit, currentConfigName, expectedBPOrder=[], enableQml=True):
|
def doSimpleDebugging(currentKit, currentConfigName, expectedBPOrder=[], enableQml=True):
|
||||||
|
|
||||||
|
# this function verifies if the text matches the given
|
||||||
|
# regex inside expectedTexts
|
||||||
|
# param text must be a single str
|
||||||
|
# param expectedTexts can be str/list/tuple
|
||||||
|
def regexVerify(text, expectedTexts):
|
||||||
|
if isString(expectedTexts):
|
||||||
|
expectedTexts = [expectedTexts]
|
||||||
|
for curr in expectedTexts:
|
||||||
|
pattern = re.compile(curr)
|
||||||
|
if pattern.match(text):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
expectedLabelTexts = ['Stopped\.', 'Stopped at breakpoint \d+ in thread \d+\.']
|
expectedLabelTexts = ['Stopped\.', 'Stopped at breakpoint \d+ in thread \d+\.']
|
||||||
if len(expectedBPOrder) == 0:
|
if len(expectedBPOrder) == 0:
|
||||||
expectedLabelTexts.append("Running\.")
|
expectedLabelTexts.append("Running\.")
|
||||||
|
@@ -370,19 +370,6 @@ def enabledCheckBoxExists(text):
|
|||||||
except:
|
except:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# this function verifies if the text matches the given
|
|
||||||
# regex inside expectedTexts
|
|
||||||
# param text must be a single str
|
|
||||||
# param expectedTexts can be str/list/tuple
|
|
||||||
def regexVerify(text, expectedTexts):
|
|
||||||
if isString(expectedTexts):
|
|
||||||
expectedTexts = [expectedTexts]
|
|
||||||
for curr in expectedTexts:
|
|
||||||
pattern = re.compile(curr)
|
|
||||||
if pattern.match(text):
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
# function that opens Options Dialog and parses the configured Qt versions
|
# function that opens Options Dialog and parses the configured Qt versions
|
||||||
# the function returns a list of the found Qt versions
|
# the function returns a list of the found Qt versions
|
||||||
|
Reference in New Issue
Block a user