diff options
author | Robert Loehning <robert.loehning@qt.io> | 2018-07-24 13:47:25 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2018-07-26 13:05:06 +0000 |
commit | 210a873efbf99d3e1c9b39387a697382ba254b24 (patch) | |
tree | 0367f31c4e76012c18c214ec6925b77313db4ecf /tests | |
parent | 5787ecb025c668c988e5bb4881c307b0df1a7e2f (diff) |
Squish: Forward qbs' warnings about deprecated features
Change-Id: Ib99713b95d010acf4b49065ad7e20862e59476d1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system/shared/build_utils.py | 10 | ||||
-rw-r--r-- | tests/system/suite_general/tst_opencreator_qbs/test.py | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index 964cec2458..5c40c92cc2 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -25,6 +25,11 @@ import re; +def getBuildIssues(): + ensureChecked(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton") + model = waitForObject(":Qt Creator.Issues_QListView").model() + return dumpBuildIssues(model) + # this method checks the last build (if there's one) and logs the number of errors, warnings and # lines within the Issues output # param expectedToFail can be used to tell this function if the build was expected to fail or not @@ -36,16 +41,13 @@ def checkLastBuild(expectedToFail=False, createTasksFileOnError=True): except LookupError: test.log("checkLastBuild called without a build") return - ensureChecked(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton") - model = waitForObject(":Qt Creator.Issues_QListView").model() - buildIssues = dumpBuildIssues(model) + buildIssues = getBuildIssues() types = map(lambda i: i[5], buildIssues) errors = types.count("1") warnings = types.count("2") gotErrors = errors != 0 test.verify(not (gotErrors ^ expectedToFail), "Errors: %s | Warnings: %s" % (errors, warnings)) # additional stuff - could be removed... or improved :) - test.log("Rows inside issues: %d" % model.rowCount()) if gotErrors and createTasksFileOnError: createTasksFile(buildIssues) return not gotErrors diff --git a/tests/system/suite_general/tst_opencreator_qbs/test.py b/tests/system/suite_general/tst_opencreator_qbs/test.py index a20426d359..3b7a86a42b 100644 --- a/tests/system/suite_general/tst_opencreator_qbs/test.py +++ b/tests/system/suite_general/tst_opencreator_qbs/test.py @@ -46,4 +46,9 @@ def main(): else: test.warning("Parsing project timed out") compareProjectTree(rootNodeTemplate % "Qt Creator", "projecttree_creator.tsv") + buildIssuesTexts = map(lambda i: str(i[3]), getBuildIssues()) + deprecationWarnings = filter(lambda s: "deprecated" in s, buildIssuesTexts) + if deprecationWarnings: + test.warning("Creator claims that the .qbs file uses deprecated features.", + "\n".join(set(deprecationWarnings))) invokeMenuItem("File", "Exit") |