зеркало из https://github.com/mozilla/gecko-dev.git
Bug 443090 - Unify unittest failures (runtests leaks part) p=ted.mielczarek, r=sayrer
This commit is contained in:
Родитель
3cfe0e4c1a
Коммит
31d026a0fe
|
@ -376,7 +376,7 @@ Are you executing $objdir/_tests/testing/mochitest/runtests.py?"""
|
||||||
r"\d+\s+(?P<numLeaked>\d+)")
|
r"\d+\s+(?P<numLeaked>\d+)")
|
||||||
thresholdExceeded = False
|
thresholdExceeded = False
|
||||||
seenTotal = False
|
seenTotal = False
|
||||||
prefix = "WARNING"
|
prefix = "TEST-PASS"
|
||||||
for line in leaks:
|
for line in leaks:
|
||||||
matches = lineRe.match(line)
|
matches = lineRe.match(line)
|
||||||
if not matches:
|
if not matches:
|
||||||
|
@ -387,15 +387,15 @@ Are you executing $objdir/_tests/testing/mochitest/runtests.py?"""
|
||||||
bytesLeaked = int(matches.group("bytesLeaked"))
|
bytesLeaked = int(matches.group("bytesLeaked"))
|
||||||
if bytesLeaked > threshold:
|
if bytesLeaked > threshold:
|
||||||
thresholdExceeded = True
|
thresholdExceeded = True
|
||||||
prefix = "ERROR FAIL"
|
prefix = "TEST-UNEXPECTED-FAIL"
|
||||||
log.info("ERROR FAIL leaked %d bytes during test execution (should "
|
log.info("TEST-UNEXPECTED-FAIL | runtests-leaks | leaked %d bytes during test execution (should "
|
||||||
"have leaked no more than %d bytes)",
|
"have leaked no more than %d bytes)",
|
||||||
bytesLeaked, threshold)
|
bytesLeaked, threshold)
|
||||||
elif bytesLeaked > 0:
|
elif bytesLeaked > 0:
|
||||||
log.info("WARNING leaked %d bytes during test execution",
|
log.info("TEST-PASS | runtests-leaks | WARNING leaked %d bytes during test execution",
|
||||||
bytesLeaked)
|
bytesLeaked)
|
||||||
else:
|
else:
|
||||||
log.info("SUCCESS no leaks detected!")
|
log.info("TEST-PASS | runtests-leaks | no leaks detected!")
|
||||||
else:
|
else:
|
||||||
numLeaked = int(matches.group("numLeaked"))
|
numLeaked = int(matches.group("numLeaked"))
|
||||||
if numLeaked != 0:
|
if numLeaked != 0:
|
||||||
|
@ -405,7 +405,7 @@ Are you executing $objdir/_tests/testing/mochitest/runtests.py?"""
|
||||||
else:
|
else:
|
||||||
instance = "instance"
|
instance = "instance"
|
||||||
rest = ""
|
rest = ""
|
||||||
log.info("%(prefix)s leaked %(numLeaked)d %(instance)s of %(name)s "
|
log.info("%(prefix)s | runtests-leaks | leaked %(numLeaked)d %(instance)s of %(name)s "
|
||||||
"with size %(size)s bytes%(rest)s" %
|
"with size %(size)s bytes%(rest)s" %
|
||||||
{ "prefix": prefix,
|
{ "prefix": prefix,
|
||||||
"numLeaked": numLeaked,
|
"numLeaked": numLeaked,
|
||||||
|
@ -414,7 +414,7 @@ Are you executing $objdir/_tests/testing/mochitest/runtests.py?"""
|
||||||
"size": matches.group("size"),
|
"size": matches.group("size"),
|
||||||
"rest": rest })
|
"rest": rest })
|
||||||
if not seenTotal:
|
if not seenTotal:
|
||||||
log.info("ERROR FAIL missing output line for total leaks!")
|
log.info("TEST-UNEXPECTED-FAIL | runtests-leaks | missing output line for total leaks!")
|
||||||
leaks.close()
|
leaks.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче