diff --git a/tests/system/shared/debugger.py b/tests/system/shared/debugger.py index d409d5b0668..bb6b4082b63 100644 --- a/tests/system/shared/debugger.py +++ b/tests/system/shared/debugger.py @@ -107,6 +107,20 @@ def removeOldBreakpoints(): # This can be the return value of setBreakpointsForCurrentProject() if you # passed the breakpoints into that function in the right order 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+\.'] if len(expectedBPOrder) == 0: expectedLabelTexts.append("Running\.") diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index f5e0f5845f5..d424bd72021 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -370,19 +370,6 @@ def enabledCheckBoxExists(text): except: 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 # the function returns a list of the found Qt versions