summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjasplin <qt-info@nokia.com>2011-04-05 10:05:39 +0200
committerjasplin <qt-info@nokia.com>2011-04-05 10:05:39 +0200
commit6c0002fcd9eddea6af3ea765a40ce5dc5a793fff (patch)
tree618041584cec33635c5c77f6e098a7f67ebaf973
parente56e8acba449d5176d741c2d209a7c2c58c2b3bc (diff)
Bugfix: Failed verification assumed data-driven testing.
QCOMPARE and friends could be used to ensure that performance was measured for the intended code path: A failed verification step would indicate an invalid benchmark result. This information would then be stored in the database and taken into consideration in a later analysis. The feature falsely relied on explicit data tags being used and was simply ignored for test functions without such tags (i.e. without a corresponding _data() function).
-rwxr-xr-xscripts/uploadresults.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/uploadresults.py b/scripts/uploadresults.py
index 60c16a6..a50285c 100755
--- a/scripts/uploadresults.py
+++ b/scripts/uploadresults.py
@@ -79,12 +79,20 @@ def canonicalMetric(metric):
def matchesFailedIncident(dataTag, incidents):
for incident in incidents:
if (incident.getAttribute("type") == "fail"):
+
+ dataTagElems = incident.getElementsByTagName("DataTag")
+
+ if dataTag == "": # special case
+ assert len(dataTagElems) == 0
+ return True
+
try:
- dataTagElem = incident.getElementsByTagName("DataTag")[0]
+ dataTagElem = dataTagElems[0]
except:
continue
if (dataTagElem.childNodes[0].data == dataTag):
return True
+
return False